Skip to main content
Participating Frequently
September 10, 2020
Answered

Script check needed

  • September 10, 2020
  • 3 replies
  • 3207 views

Hi all,

 

I would like to have a check on the script for my checklist. It has 16 categories and for each category there are 4 options: 0 , 1 , 2 , 3 (for all the options the value is alike, so 0 =value 0, 1 =value 1, etc.)

 

at the bottom of each option there's a field: subtotal

 now I've added the following code to those fields: 

 

event.value=(this.getField("Top_0").value+this.getField("Vest_0").value +this.getField("Broek_0").value +this.getField("Panty_0").value +this.getField("Schoenen_0").value +this.getField("Haar_0").value +this.getField("Makeup_0").value +this.getField("Bril_0").value +this.getField("Oorbellen_0").value +this.getField("Ketting_0").value +this.getField("Sjaal_0").value +this.getField("Armbanden_0").value +this.getField("Ringen_0").value +this.getField("Nagellak_0").value +this.getField("Riem_0").value +this.getField("Tas_0").value)

 

event.value=(this.getField("Top_1").value+this.getField("Vest_1").value +this.getField("Broek_1").value +this.getField("Panty_1").value +this.getField("Schoenen_1").value +this.getField("Haar_1").value +this.getField("Makeup_1").value +this.getField("Bril_1").value +this.getField("Oorbellen_1").value +this.getField("Ketting_1").value +this.getField("Sjaal_1").value +this.getField("Armbanden_1").value +this.getField("Ringen_1").value +this.getField("Nagellak_1").value +this.getField("Riem_1").value +this.getField("Tas_1").value)

 

event.value=(this.getField("Top_2").value+this.getField("Vest_2").value +this.getField("Broek_2").value +this.getField("Panty_2").value +this.getField("Schoenen_2").value +this.getField("Haar_2").value +this.getField("Makeup_2").value +this.getField("Bril_2").value +this.getField("Oorbellen_2").value +this.getField("Ketting_2").value +this.getField("Sjaal_2").value +this.getField("Armbanden_2").value +this.getField("Ringen_2").value +this.getField("Nagellak_2").value +this.getField("Riem_2").value +this.getField("Tas_2").value)

 

event.value=(this.getField("Top_3").value+this.getField("Vest_3").value +this.getField("Broek_3").value +this.getField("Panty_3").value +this.getField("Schoenen_3").value +this.getField("Haar_3").value +this.getField("Makeup_3").value +this.getField("Bril_3").value +this.getField("Oorbellen_3").value +this.getField("Ketting_3").value +this.getField("Sjaal_3").value +this.getField("Armbanden_3").value +this.getField("Ringen_3").value +this.getField("Nagellak_3").value +this.getField("Riem_3").value +this.getField("Tas_3").value)

 

 

for the total field I used the (2nd) option: Value is the sum(+)

 

now when selecting the options, the total field is calculating the values correctly, only in the subtotalfields there's no value visible, so it looks like it isn't calculating. 

Can you help me with this? Is it something in the code?

This topic has been closed for replies.
Correct answer Nesa Nurani

Try this OUTFIT_CHECKLIST_radiobuttons origineel1 and see if it works for you.

3 replies

Inspiring
September 14, 2020

In column 0 you want all buttons to have value 0, in column 1 all buttons have value 1...etc?

so for example if you select all buttons in column 1 result will be 16, if you select all buttons in column 3 result will be 32 and total would be 48, you want it  like that?

Participating Frequently
September 14, 2020

Yes exactly!

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
September 14, 2020

Try this OUTFIT_CHECKLIST_radiobuttons origineel1 and see if it works for you.

Nesa Nurani
Community Expert
Community Expert
September 11, 2020

Did you check Field calculation order? If that doesn't help,share your file here.

Participating Frequently
September 11, 2020

I've shared the file 🙂

Bernd Alheit
Community Expert
Community Expert
September 11, 2020

Check the Javascript console for errors.

 

There are no fields with the name "Top_0", "Vest_0", and so on.

Bernd Alheit
Community Expert
Community Expert
September 10, 2020

For the subtotal fields you can also use the (1st) option.

Participating Frequently
September 11, 2020

Hi Bernd,

 

what do you mean with the 1st option?

Bernd Alheit
Community Expert
Community Expert
September 11, 2020

For the calculation: Value is the sum(+)