Auto-populate a field if two select_multiple fields equal each other

428
1
06-03-2021 03:58 AM
JasonCyphers
Occasional Contributor III

I have two select_multiple fields, one to capture work that needs to be performed, and one to select work that has been performed. I also have a yes/no, select_one text field to indicate when all work has been completed.

Is it possible to have some sort of calculation that would auto populate the yes/no text field if all the same selections were made in the work completed field as were made in the work needed field? Something similar to: if (select_multiple field 2 = select_multiple field 1, then yes/no text field = "Yes","No")

It seems to work if only a single, identical selection is made in each field; however, if multiple selections are made in the "work required" field, even if those same two selections are made in the "work completed" field, the calculation doesn't work.

0Kudos
1 Reply
ZacharySutherby
金宝搏吧

Hello@JasonCyphers,

One option would be to use the count-selected() function to compare the two select_multiple questions.

For example: if(count-selected(${work_to_be_done})=count-selected(${work_done}),'yes', '')

This assumes if both questions have the same number of options selected all the work has been completed.

Thank you,

Zach

Thank you,
Zach
0Kudos