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
How to get queries displaying correct when using process to show results?
Re: How to get queries displaying correct when using process to show results?
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
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: How to get queries displaying correct when using process to show results?
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.
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.
Re: How to get queries displaying correct when using process to show results?
Announced here
https://www.awareim.com/forum/viewtopic ... 654#p53654
https://www.awareim.com/forum/viewtopic ... 654#p53654
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
Aware Programming & Consulting - Tampa FL
Re: How to get queries displaying correct when using process to show results?
Defined like any other table (BO)
Set to non persisted
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
Jaymer
Aware Programming & Consulting - Tampa FL