How To Conditionally Display Different Queries In Same Panel

Contains tips for configurators working with Aware IM
Post Reply
Aware2014
Posts: 169
Joined: Sun Dec 29, 2013 9:49 pm

How To Conditionally Display Different Queries In Same Panel

Post by Aware2014 »

1. Define an attribute in BO RegularUser that will be checked for a value. Here we will call that attribute RegularUser.FlagCheck in this example.

2. Define a form that will be used to store the value for the FlagCheck attribute. We will call this Form1 in this example.

3. Define a process that will be used to show/edit Form1. We will call this Process1 in this example. Use the process syntax as follows:

Code: Select all

FIND RegularUser WHERE RegularUser.LoginName = LoggedInRegularUser.LoginName
EDIT RegularUser USING 'Form1'
4. Define 2 or more queries that you would like to view in a single panel. We will call them Query1 and Query2 in this example.

5. Define a process that checks the flag value and then displays the appropriate query. We will call this Process2 in this example. Use the process syntax as follows:

Code: Select all

IF EXISTS LoggedInRegularUser WHERE (LoggedInRegularUser.Focus_UseMyDemographic = 'Yes') Then
DISPLAY 'Query1'
ELSE
DISPLAY 'QUery2'
6. In each query, set the AutoRefresh with the process that show/edits the FlagCheck attribute (Process1) and with the BO RegularUser. Also set the 'Use Process to refresh query' with Process2 in the AutoRefresh for each query.

7. Create a visual Perspective panel tab with the Command to Start Process Process2. We will call this Tab1.

Now when the value is changed the appropriate query results will be waiting in Tab1.
8.0, 2361, Windows, SQL Server Express
Aware2014
Posts: 169
Joined: Sun Dec 29, 2013 9:49 pm

Post by Aware2014 »

Noticed an cut/past error in original note - replace the code in Step 5 with the following:

Code: Select all

IF EXISTS LoggedInRegularUser WHERE (LoggedInRegularUser.FlagCheck = 'Yes') Then
DISPLAY 'Query1'
ELSE
DISPLAY 'Query2'
8.0, 2361, Windows, SQL Server Express
nlarson
Posts: 597
Joined: Thu Apr 14, 2011 7:56 pm

Post by nlarson »

Slick!
Post Reply