Wondering if anyone has run into this with 2024.2.12?
Kinetic Dashboard based on UD Parent/Child table,
Two grids set up in Pub/Sub baq/dataview on each ,
Second grid has this in Grid Model > Provider Model > Baq Options, this worked in prior releases to 2024.2.12:
UD110A_Key1 = ?{gridTTGReqs.UD110_Key1}
Looks like they added a SQL cleansing function to BAQ Where criteria processing;
This expression now results in an error:
Checking the exception in javascript shows that it’s attempting to do a string.replace() on the resolved value of the right side of the equals sign. This is failing because UD110_Key1 resolves to a numeric: 1, (it’s actually a string on the table, so they should be checking field properties to pass it as a string vs. implicit type declaration…)
There is not a .replace() method on a Number, so it bombs out and does not update the lower grid.
Changing my where criteria to be the below fixes the issue. (add single quotes around the returned value)
It’s fun to keep track of where to use single quotes vs. double quotes vs. no quotes
and I didn’t notice until I added a second record, double quotes actually bomb out as well, but fails differently. Instead of the bottom grid being empty, it displays all records.
the syntax needs to be:
UD110A_Key1 = '?{gridTTGReqs.UD110_Key1}'
I get this error with double quotes:
main.f359e4501fa82477.js:520 Errors in criteria parser for expression: UD110A_Key1 = "2" Errors: invalid token: ",invalid argument outside of criteria: 2
Generally, if it’s the JSON editor, it’s double quotes.
If it’s a JavaScript expression field, it’s single quotes.
Outside of that, it’s a free for all.
Don’t forget about SQL syntax, which is used in “where”, “having”, etc. conditions, and taken as input to some BOs… that one uses single quotes… just for even more funsies
Process of elimination?
JSON Editor tells you.
Probably SQL if it’s BAQ/REST/Param related.
Probably JavaScript if it’s an expression field.
Probably sacrifice your first born to unlock the syntax of everything else.