Issue with Invert Boolean Variable Functionality

I’m attempting to invert a boolean when pressing a button in a web app. I have added a button with the functionality set to “Invert boolean variable”, and selected my RAPID PERS variable from the dropdown. When I deploy and press this button from the teach pendant, I successfully invert the boolean. However, I also get the error “1102002 - Failed to execute event. The event execution failed, maybe logic error or undefined variable. Error: [object Object]” This same error appears every time I press the button, and is very annoying to the operators. If I change the button functionality to “invert signal” instead, I can invert a signal without triggering this popup error. I tried creating a blank web app except for a single button that inverts a boolean variable, but this error still appears. Does anyone have any troubleshooting suggestions?

Because the syncPers value is true by default to sync current value directly, but it causes the issue if users use it during execution.

You can modify the default value to “false” manually to avoid the error dialog. but this also means that you have to call the syncPers if you need to update current value as initial value.

https://abbiscn3glbstdblb0001.blob.core.chinacloudapi.cn/appstudioproduct/allApiDocs/1.3.0/apiDocs/api/API.RWS.RAPID.html#syncPers

For next version 1.3.0, the default value is false because we received several feedbacks about it.

1 Like

That fixed the issue, thanks!