Add a little extra smarts in BPM Query

It would be helpful if there were just a little extra smarts in the Query creator in the BPM widgets. Specifically the criteria that equals a constant. That’s one of the things that trips up a lot of people because it’s different between the SQL BAQ in the fact that in the SQL one, you do not need to add any quotes (single or double) and the system is able to handle it. In the BPM query, I would think that the system could look at the type that was being compared and add in the appropriate quotes or not for the comparison.

If not automatic, at least a better error message closer the the point of making the query would be helpful. Here’s a link of the most recent hiccup that got someone, but there are many instances around where someone (including myself) has a hard time figuring out what they did wrong.

@timshuwy let me know if this is a bad idea for any reason.

And add a little automation… When you select the “Constant” drop down in the criteria, automatically open the dialog to enter the constant value.

It’s bad enough I cant use the keyboard to select which dropdown, but have to select that AND then click the “constant” link in that dropdown selection.

One more thing… Have pressing the tab key when in the far right field of a grid, automatically create a new row.

well… one “problem” is that the BPM system is actually building up a C# command. if you type in a text string without quotes, it actually turns it into a variable name, and if that variable exists, it will use it (i believe).
another challenge between BPM and BAQ logic is that BPMs are using C# logic, and you have to use double quotes for strings… but BAQs use SQL logic, which requires SINGLE quotes for strings. in C#, single quotes are only used for single digit character settings (a different type of variable). Also, if you put double quotes around a string, SQL things you are referencing a field name… which is backwards.
It all comes down to the fact that these two LOOK like they are doing something similar, but in fact, are very different back end.
In my personal view, we should have eliminated the need for quotes in ALL places, and have the system automatically put in the correct type of quote in these widgets.

1 Like

That’s all I am asking for.

should this read

“… BPMs are using C# logic, and you have to use double quotes for strings… but BAQs use SQL logic,…”

???

1 Like

Thanks… I fixed my original answer.

1 Like

And it’s funny that you have to put single quotes in the BPM constant. :face_with_raised_eyebrow: Did they maybe just take the single quotes logic from the BAQ, and forgot to add the second ones in the BPM, so you have to put in single quotes to end up with double quotes in C#?

I think that the BAQ logic and the BPM logic was written by two differing teams.
Sounds like it is time for an enhancement request.
While you are at it… you might want to request a feature that would allow the COPY and PASTE of a query widget (the referenced table and its displayed fields) from one BAQ or one Sub-Query to another (like you can do in BPMs).

I think that’s pretty much what this request is asking.

1 Like