DISPLAY ACTION RESULTS COLUMNS

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
UnionSystems
Posts: 197
Joined: Fri Jun 17, 2016 7:10 am
Location: Brisbane Australia
Contact:

DISPLAY ACTION RESULTS COLUMNS

Post by UnionSystems »

I want to dynamically build a FIND and pass the resulting context to a controlled set of columns (like a query).

When I run a process with the following

Code: Select all

DISPLAY Person WHERE Person.Surname='Smith'
I see the correct result rows but with a random set of columns and header caption of "Search Results". Is there a way to define what columns are output? is it possible to pass a FIND to a Query ?

Alternatively if I do the following

Code: Select all

EXEC_STRING `FIND Person WHERE Person.Surname='Smith' `
DISPLAY TEST 
Where TEST is a query with

Code: Select all

FIND Person WHERE Person=ThisPerson   
I see a single row result with a Surname of Smith.

If I extend the TEST query to be

Code: Select all

FIND Person WHERE Person=ThisPerson  OR Person=ThatPerson  OR Person=OtherPerson 
I get 3 rows. So it feels like the QUERY is aware of the Context, but I would have expected OtherPerson to include more?

My objective is to be allow a normal user to dynamically build a "FIND" based on whatever criteria they may wish and pass the result of that FIND to a set of definable columns. My assumption is the dynamic FIND (or DISPLAY) action will be executed using the EXEC_STRING Action.
AWS Linux, Windows Server, AIM 8.4 & 8.6
BobK
Posts: 545
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: DISPLAY ACTION RESULTS COLUMNS

Post by BobK »

I may not exactly understand your objective, so this might be off base, but try this.

Create your query called TEST as

Code: Select all

FIND Person WHERE Person.Surname=?Surname
and define the caption and attributes to be displayed in the results

In your process just do

Code: Select all

DISPLAY TEST
When your process runs, the user will be asked for the surname to search for and then display the results with the defined caption and attributes
Bob
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: DISPLAY ACTION RESULTS COLUMNS

Post by tford »

There might be an easier way to accomplish your goal, but I wonder if this will work:

1) Execute your dynamically built string, like: EXEC_STRING `FIND Person WHERE Person.Surname='Smith' `

2) INSERT the resulting instances of Person BO into LoggedInSystemUser.Selected_Persons

3) DISPLAY TEST (where TEST uses FIND Person WHERE (Person IN LoggedInSystemUser.Selected_Persons)
Tom - V8.8 build 3137 - MySql / PostGres
Post Reply