Hello, lovely group,
I have two checkboxes: Checkbox A with 3 options and Checkbox B with 2 options.
I want to create a calculated field in a custom form that will multiply the number of selected options from Checkbox A by the number of selected options from Checkbox B. For example, if a user selects 2 options from Checkbox A and 3 options from Checkbox B, the result should be 2 * 3 = 6.
How can I achieve this since I don't see any functions like LENGTH() that can work with arrays?
Views
Replies
Total Likes
seems fairly simple
result:
make sure to configure all fields as numbers!
good luck
R
Views
Replies
Total Likes
Hello Rafal,
I think @ibmfur tried to achieve something else.
The challenge is to find out how many choices are made on each Multi-Select Dropdown and multiply the count with each other.
So, with the help of the great solution by @Doug_Den_Hoed__AtAppStore in this thread, you can do something like this:
IF(LEN({DE:firstMultiselectField})>0,1+LEN(REPLACE({DE:firstMultiselectField},",",",,"))-LEN({DE:firstMultiselectField}),0) * IF(LEN({DE:secondMultiselectField})>0,1+LEN(REPLACE({DE:secondMultiselectField},",",",,"))-LEN({DE:secondMultiselectField}),0)
As Doug wrote, the values of the choices in your multi select dropdowns should not contain any commas.
Regards
Lars
Hi Lars,
I tried the codes, but I ran into some syntax errors. I'll need to spend some time figuring out why, and I'll probably check out the post you mentioned.
Thanks for pointing me in the right direction and letting me know this is doable!
Views
Replies
Total Likes
Just a follow-up, I have managed to solve the errors and everything works beautifully. Thanks again Lars
Views
Replies
Total Likes
Views
Likes
Replies