How to get queries displaying correct when using process to show results?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
lueu
Posts: 89
Joined: Tue Mar 07, 2023 11:49 pm

How to get queries displaying correct when using process to show results?

Post by lueu »

How do I get the query results to display the way I have set it up for the queries, when I use a process to show the query?
If I only display the query it displays like I've set it up, with the correct columns and so on. But when I run the same query using a provess, it seems to be just random columns displayed?

I am using a process to filter what records in the query the user should see, based on access level. So when a user logs in and chooses a query with one of the buttons I provided, a process is started so make sure that the user only sees a filtered result of the query.

The rules in the processes looks like this, with variation of access levels and IDs:
IF LoggedInSystemUser.AccessLevel='HST' THEN DISPLAY Plantall_PHVTSB WHERE Plantall_PHVTSB.ReshID=105403
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: How to get queries displaying correct when using process to show results?

Post by Jaymer »

You have half of the right idea.
In the process, you can’t use the where conditions.
The context, i.e. the result set, does not get passed to a query.

So the query needs to have the where clause in it.
You can use a combination of the loginsystemuser or the new in-memory variables to Store the criteria, then in the query, it references those fields.

Frontend screen with the buttons is fine.
The buttons can call the process if you need more logic.
Ultimately, you’re just gonna do a DISPLAY queryname
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
lueu
Posts: 89
Joined: Tue Mar 07, 2023 11:49 pm

Re: How to get queries displaying correct when using process to show results?

Post by lueu »

Thanks Jaymer, I will check this out.
Can you point me in the right direction on how to find documention on this new in-memory variables? I can't seem to find anything about it.
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: How to get queries displaying correct when using process to show results?

Post by Jaymer »

Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: How to get queries displaying correct when using process to show results?

Post by Jaymer »

Defined like any other table (BO)
Set to non persisted
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply