Changing all filters in multiple process flows with a single action in EG?

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Changing all filters in multiple process flows with a single action in EG?

Is it possible to change multiple filters or query builders in EG, spread out over multiple process flows, by a single action, for example with a prompt?

In my project are, let's say, 10 filters, in multiple process flows, to select only the records where the value of a certain variable is for example '001', and eventually create a report for this '001'. Afterwards I want to create the same report but this time for all records where the variable is filtered to '002', so the value in all 10 filters should be changed to '002'. And so on to '100'. I don't want to change the value within each filter individually everytime, but I'm looking for a way to change all 10 filters with a single action.

Could anyone help me with this? Footnote: I am fairly new to SAS EG.

Any help would be very much appreciated!


Accepted Solutions
Solution
‎08-29-2013 02:54 AM
Super Contributor
Posts: 644

Re: Changing all filters in multiple process flows with a single action in EG?

Posted in reply to JGeerards

A simple way to achieve this is to use a macro variable.

At the start of the first process flow insert a program that contains a statement like

     %Let SelectValue = 001 ;

Then in each query insert the value &SelectValue instead of 001.  If the selection is against a character variable you may need to insert "&SelectValue" if the query does not automatically wrap the vaue in quotes.  Don't use single quotes. 

Then next time the project is run all you need to change is the initial program code.

Your next question will be how to automate this to run through all the possible filter values...

Richard

View solution in original post


All Replies
Solution
‎08-29-2013 02:54 AM
Super Contributor
Posts: 644

Re: Changing all filters in multiple process flows with a single action in EG?

Posted in reply to JGeerards

A simple way to achieve this is to use a macro variable.

At the start of the first process flow insert a program that contains a statement like

     %Let SelectValue = 001 ;

Then in each query insert the value &SelectValue instead of 001.  If the selection is against a character variable you may need to insert "&SelectValue" if the query does not automatically wrap the vaue in quotes.  Don't use single quotes. 

Then next time the project is run all you need to change is the initial program code.

Your next question will be how to automate this to run through all the possible filter values...

Richard

New Contributor
Posts: 2

Re: Changing all filters in multiple process flows with a single action in EG?

Posted in reply to RichardinOz

Thank you very much, I'm not too familiar with writing in code but this works just fine.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 208 views
  • 0 likes
  • 2 in conversation