BookmarkSubscribeRSS Feed
shudsoo
Calcite | Level 5

Hi,

I am trying to create a cascading prompt within Enterprise Guide 4.3 without having to use a stored process - I can create a simple prompt using multiple values from a dynamic list and then I can refer to that prompt in the query builder filter but how would I create a cascading prompt that depending on the first measure would only return results from the second measure?

Thanks

Steve


2 REPLIES 2
ChrisHemedinger
Community Manager

Steve,

Unfortunately, cascading prompts work only with stored processes in EG.  That's the only place you'll see the "Dependency" tab when defining prompts...

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
TimCampbell
Quartz | Level 8

Hi Steve,

I am hitting the same problem as you and Chris is right that the only way to go is stored processes for cascading prompts.

/* Begin Rant */

Thisis a serious design flaw in enterprise guide in my opinion because whilst a stored process prompt in enterprise guide can be cascading, the code that the stored process runs cannot reference any other information from your SAS session because stored processes start their own sessions.

/* End Rant */

But enough of my whining... I have found a way that you can make your dynamic prompts slightly more dynamic without making them cascading depending on your circumstances.

if you want your prompt for values in your dynamic list to react to values selected in a different prompt (or macro variable defined earlier in the project) you can do it by registering views that combine the table containing your data and the sashelp.vmacro table.

for example, I have an enterprise guide project where my users import some scenario data, save it into a library that many users have access to and record the scenario creation in an audit table along with their user id.

In another part of the same project i want the users to be able to pick a scenario that has been imported to use for further processing but i want them to only be able to select scenarios that they have imported themselves.

For this prompt I used proc SQL to create a view which joins my audit table onto sashelp.vmacro where the sashelp.vmacro value variable matches the user id in my audit table and where the sashelp.vmacro name variable is SYSUSERID. In this way the list of scenarios in the view changes depending on the user looking at it. (it is worth checking that the view has the correct data you want in it at this point before you try to register it, been stung by this so many times!)

if you use the Data Library Manager in management console to register the view in metadata (mine usuallyerrors but that is fine) and then DI Studio to update the metadata for the registered table you will probably get an error message again but if you view the details of the error you can find the proc metalib statement you need to run to update the metadata, which should run fine from the EG session that you used to create the view.

If all that worked you can point your program prompt to the view and then the dynamic list will automatically change depending on your connection profile or whatever macro variable values you defined.

Not quite a cascading prompt i know but a little better than a normal prompt.

On a related note, If anyone does know of a way to get a stored process to run in the same session as the open enterprise guide project that would solve no end of issues...

Tim

---Found the answer to my last question.

https://communities.sas.com/message/147006#147006

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2710 views
  • 0 likes
  • 3 in conversation