cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to set fields readonly after calculation

Former Member
0 Kudos

Hi all,

I'm facing a problem.

I got a table with some numeric fields, user can set value on thoses numeric fields..

After the table i add a footer line with Total field and add the formcalc script "SUM(.... ) " and that works fine .

Now i want to set all field of a colum to read only if the total of the colum is equal to 1.

I'll try to do it in the same event "Calculated" and all fields are set to read only but the total value is still Zero ( the sum is not display ) .

As far as i see, only event "Validate" can be used after calculation but if i put my code in this event, i got an "error validating message"....

Does somebody can help me ?

Best regards.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member189058
Active Contributor
0 Kudos

What is the code that you are using?

Former Member
0 Kudos

Hi,

In the event calculate i wrote this in formcalc

Sum(Activity_detail[].day1[]) + sum(Activity_detail[].day1[])

if $.rawValue == "1" then

for i = 0 upto 3 step 1 do

$.resolvenode("data.DynamicPart.Activity.Activity_detail["i"].day1").access = "readonly"

endfor

endif

My problem is that with this code, fields can be set to readonly but the sum is not display.

Can you help me ?

former_member189058
Active Contributor
0 Kudos

Hi,

Assisgn the sum that is calculated to $.rawValue.

$.rawValue = Sum(.....)

Regards,

Reema.

Former Member
0 Kudos

Hi,

Solved it by my own using Javascript instead of Formcalc.

Thanks