Skip to main content
Participating Frequently
Sep 10, 2020 3:34 PM UTC
Answered

Script check needed

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 is closed to new replies. Start a new post to keep the conversation going.
Nesa Nurani
Nesa NuraniCorrect answer
Community Expert
Sep 14, 2020 1:57 PM UTC

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

30 replies

Inspiring
Sep 14, 2020 11:54 AM UTC

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?

Translate
Participating Frequently
Sep 14, 2020 1:33 PM UTC

Yes exactly!

Translate
Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
Sep 14, 2020 1:57 PM UTC

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

Translate
Nesa Nurani
Community Expert
Community Expert
Sep 11, 2020 10:19 AM UTC

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

Translate
Participating Frequently
Sep 11, 2020 10:24 AM UTC

I've shared the file 🙂

Translate
Bernd Alheit
Community Expert
Community Expert
Sep 11, 2020 10:37 AM UTC

Check the Javascript console for errors.

 

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

Translate
Bernd Alheit
Community Expert
Community Expert
Sep 10, 2020 3:41 PM UTC

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

Translate
Participating Frequently
Sep 11, 2020 9:19 AM UTC

Hi Bernd,

 

what do you mean with the 1st option?

Translate
Bernd Alheit
Community Expert
Community Expert
Sep 11, 2020 9:25 AM UTC

For the calculation: Value is the sum(+)

Translate