Home > Forum > Rules, JS, SQL > Business rule parameter string casting bug?

Business rule parameter string casting bug?
0

Hi,

short: Business rule text parameter string values only containing digits seem to get casted to an integer value in WEBCON.

long:
Declaring a VARCHAR variable in SQL as a string like '001' is returned as string. If 001 is replaced by a text parameter in between single quotes its value '001' turns to 1 as integer.

I would expect that a string value '001' remains a string when using it as a text parameter in a business rule. This is needed when ids have leading zeros as e.g. SAP often has it. The workaround would be to CAST all those values to an INT before or when doing comparisons between values e.g. in a WHERE clause.

There are some examples in the screenshot and how the SQL studio does it as expected.

Is this a bug? Can anybody confirm this in a newer version too? Right now we've no instance with a newer version. Our used version is 2025.2.1.179.

(Declaring a VARCHAR variable and giving it a text parameter value with 002 or without any parameter both without single quotes the value gets casted to an integer as SQL studio does it.)

Kind regards
Sébastien

Nobody has replied in this thread yet.