Undefined boolean become true in service

Hi!

I trigger a service from my app using the Run Service action node. When I send a boolean query parameter that is undefined on the app side, it seems to initialise as true in the service. I only use the bool to read data, so there is no way it can be changed by the service.

As you can see from the screenshot below forApproval, invoiced and notInvoiced are all undefined. However, the service variables they are bound to are set to true (even when putting a break point at the first action node).

image

Setting Value On Create = false also does not help. I assume this is not intended functionality? Are you able to recreate it?

The issue is not present when using the Web Request action node. In that case the query parameter is not present in the request, thus the service variable is never bound to any value.

Also, I have worked around the issue by sending false if the value is undefined.

Hi Sivert,

We have some rules for parsing of string values to booleans. When parsing the string value “undefined” to a boolean, the value returned is true. We have been able to recreate this on our end, and this is forwarded to the Dev team as a challenge, to evaluate if this should be the result or not.

Rhys

1 Like