Function: convertDelimitedListToSQL?

Does anyone know what the difference between Kinetic-Function and Function?

image

The former is obviously functions designed in Function Maintenance, but what’s the latter? Client-side string manipulation perhaps?

I’m especially curious about the tool tip referencing convertDelimitedListToSQL. Sounds like it may be a handy way of dealing with multi-select list parameters in BAQ criteria, maybe?

The staff at Insights didn’t know and @pferrington had to leave the conference early I was told.

TIA,
Josh

1 Like

Looks like it’s simply reformatting the tilde separated list to a single-quoted, comma separated list valid for a SQL IN() clause.

I wonder if “C” arg means comma and perhaps there are other, more advanced options such as OR LIKE ‘{1}%’ OR LIKE ‘{n}%’ etc

:thinking:

PS - It’d be cool if we could extend a javascript library of such functions.

1 Like

convertDelimitedListToSQL is really just pure UI function, so this is question to UX team, not for Patrick and I.
Description is:

This function gets a SQL compatible list for use in SQL where clauses. Example item one~item two~item three~ -----> ‘item one’,‘item two’,‘item three’ OR 1~2~3~ -----> 1, 2, 3

As for tilda separated list in BAQ this is what I thought about, when I said I saw it here:

So you can use function like [Ice].num_entries(QuoteDtl.ConfigData_c, ‘~’ ) > 0 but be aware that in criteria it will be executed for every line of your table. So if there are many rows, it can be slow. Check the execution plan.
Or there is a KB how to do it in BAQ CTE;
https://epiccare.epicor.com/epiccare?id=epiccare_kb_article&sys_id=27717680db2b6a04b3227e09af961991

or simplier Jose’s example

4 Likes

Thank you Olga!

UI functions have me intrigued. So many use cases for setting REST args. :thinking: