Home > Forum > Forms > Unable to Set People field to Empty

Unable to Set People field to Empty
0

Hello,
how do I set a People/Group field to empty? When I use a rule to set the field to empty based on a condition it gives me an error on form load that says value cannot be converted to Boolean.

"Error: Incorrect operation. Value cannot be converted to boolean.\n at g.convertToBool

Thank you for your help!

In reply to: Maksymilian Stachowiak

Hi,
Please let us know what version are you using, and maybe provide some screenshots, so we can try to reproduce this behaviour.

I've tried to set it up on 2023.1.1.89, and it works without any problems - check attached screenshots :)

Hi Maksymilian, I am using version 2023.1.1.56. It worked when I used change value in the workflow (that is the solution I found) but for the form rule it didn't work. I have also tried to re-writ the rule differently.

Thank you!

MVP
In reply to: ruthw

Hi Maksymilian, I am using version 2023.1.1.56. It worked when I used change value in the workflow (that is the solution I found) but for the form rule it didn't work. I have also tried to re-writ the rule differently.

Thank you!

Hi ruthw,

the error messages refers to a boolean value. So, it should be the if condition.
You are comparing the field value to the text value „yes“. The value is written in cursive so the system interprets it as text. If your field is a Boolean field you can either omit the comparison or you use TRUE/FALSE. It will be visible be different in green/all and all uppercase.
Number are displayed as blue text if I remember correctly.



Best regards,

Daniel

MVP
In reply to: ruthw

Hi , It is a choice field with Yes/No values. When I set the field to TRUE/FALSE. It doesn't work.

Thank you for your help!

Hi ruthw,

unfortunately I don't have a 2023.1.1.56 environment. We just updated to 2023.1.2.44.
It works without issues.
Nevertheless I would recommend to use the id instead of the name. Just in case it changes. For example when you need to add another language.
We have also a fixed value list for such yes/no choice fields which has a multilingual value:
Yes$$DE$$Ja

The rule worked fine, as long as I used the same language and failed when I switched my profile to German.

Best regaards,
Daniel