Kinetic Dashboard w/2 grids pub/sub - 2024.2.12 seems to behave a little differently

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:

image

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)

UD110A_Key1 = '?{gridTTGReqs.UD110_Key1}'

I’m honestly surprised that ever worked.
It’s poor form to not wrap your strings in quotes.

1 Like

It’s fun to keep track of where to use single quotes vs. double quotes vs. no quotes :slight_smile:
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

@hmwillett hmmm is there an entry in the compendium for that?

1 Like

No, man–YOLO that shit. :rofl:

2 Likes

Sadly I am always going to forget… :frowning:

2 Likes

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.

3 Likes

How do you know which one is which?

1 Like

It tells you?

1 Like

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 :slight_smile:

1 Like

Ok in that case but not always

The JSON editors always tell you.

That’s what I mean, it’s the ONLY one in Application Studio to tell you which syntax is expected.

1 Like

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.

Easy.

4 Likes

Actually, EVERYTHING in app studio is a mystery. Will it work? Will it do what it says it will do? :man_shrugging: Fun times.

Jonathan Frakes Beyond Belief GIF by FILMRISE

2 Likes

Yes. Every time. You just haven’t sacrificed your first born and spoken the secret incantation yet. Tsch.

3 Likes

That’s why Hannah is our Kinetic Mage who’ll decrypt the mysteries for us mere mortals.

1 Like

Kinetic Mage Witch.

2 Likes

You mean the Jason Editor

it is a black and white photo of a person wearing a hockey mask .

2 Likes

They really should just use vs code for every single editor they have. Maybe one day…

2 Likes