활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
I need the sum of a column of numbers only when the dropdown is answered as Yes. Table 3, row 2, "Dropdown" is a dynamic field where the user will answer Yes or No to a parameter. If they answer yes, I need to add the column on Table 3, row 2, cell "Amount" together for a sum. In addition, they have the option to add unlimited rows to the table. I have not been successful in writing script to add all of the "Amount" cells on this table that have the answer yes and ignoring all the cells that have "no". Any help would be appreciated.
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
In your existing script, I did below changes and it is working for dropdown value. You can add similar to other fields.
form1.#subform[0].#subform[1].Subform6.#subform[0].#subform[3].Table3.TotalSubs.NumericField1[0]::calculate - (FormCalc, client)
if(Row2.DropDownList.rawValue == "YES") then
$.rawValue=SUM(Table3.Row2[*].Amount);
endif
Share the form @ vkatoch07@gmail.com. I'll have a look.
I saw your form, so the solution should be like below.
You can write a javascript function that should be called
> When you delete a row,
> On change of dropdown value
> And amount and percentage field exit
This function should have the below logic:
It should loop through all row in the table and inside the loop you need to check the dropdown YES/NO condition and then add the amount and percentage value and set it to the total fields.
The script I am writing is failing to calculate that number. I'm looking for the proper script language, that will calculate that sum. Thanks!
In your existing script, I did below changes and it is working for dropdown value. You can add similar to other fields.
form1.#subform[0].#subform[1].Subform6.#subform[0].#subform[3].Table3.TotalSubs.NumericField1[0]::calculate - (FormCalc, client)
if(Row2.DropDownList.rawValue == "YES") then
$.rawValue=SUM(Table3.Row2[*].Amount);
endif