Calculation based on table data (strings)


I'm wondering the best option for me to perofrm some simple calculations, based on some string-values within a table cell.

For example, in the table below.....

If row 1 = Yes, I'd like to add 50 to a running total
If row 2 = No, add a further 20 to that total
If row 3 (actually, row 3 is a different table - although it may not look like it) so I think that will be easier, as it will store actual numerical values....

Or, perhaps I add a custom field to each row, and perform the calculation there - then just sum the column? Still not sure how to go about that.....

I'm not a developer, so be gentle - but, if you can point me in the direction of some javascript or something, that does similar, I can probably work it out from there......

many thanks!

Yes, the direction is right. you can add custom field. and add the js expression as value of that field.

I think some knowledge you need to know is Multiple conditions in ternary conditional operator


thanks! That link is very useful....


Thanks, @AnsonHwang!