BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
brookeewhite1
Quartz | Level 8

Hi all,

 

I'm working on a puzzle I'm hoping someone can help me with. 

 

In my project, I have a Prompt that asks the user to choose whether they are interested in analyzing either 1) only paid claims or 2) all claims. The default prompt response is 1) only paid claims.

 

I have two queries set up with a Condition attached to the Prompt value, so that Query A runs if the user selects 1) only paid claims and otherwise Query B runs for 2) all claims.  It is an either/or condition. 

 

I also have an Ordered List which runs many tasks including these.

 

The process flow works as designed: if the user runs the tasks on the process flow, for example by selecting "run branch," and the user selects 1) only paid claims, then they correctly get the results of Query A; otherwise Query B runs to provide 2) all claims.  So, no problems there.

 

Where I have a problem is if I try to use the Ordered List. The Ordered List prompts the user, who selects either 1) only paid claims or 2) all claims. However, it appears to me that 1) only paid claims is always used at the decision point, regardless of what the user selects. The only way I seem to be able to get the results for 2) all claims is if we run that process flow by itself, and then manually run the other process flows.  It seems like somehow the user prompt response is ignored when the ordered list is used. 

 

Does anyone have any idea why this might be occurring?

 

Thank you in advance for any help!

 

I'm using SAS Enterprise Guide 7.1 (7.100.0.1966) (64-bit).

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
In your ordered list, how are controlling which gets run? Ordered lists just run in order of specification unless you have the conditional logic embedded in the program. Even then you'd have to ensure that the macro variable was created and available.

View solution in original post

6 REPLIES 6
ballardw
Super User

Without seeing either the entire process flow and all settings (hard to post)

or all of the code involved we are going to be shooting in the dark.

 

One suspects that there is at least one comparison yielding an unexpected value but that's as much as I could say from the problem descriptions.

 

If this were my project I might try stripping this down to only manipulating the prompts (i.e. a different project to avoid damaging what may be working) and the ordered list with only prints of small data sets to avoid getting confused with the actual in depth calculations to test that the prompts and list are used correctly.

Then make sure the details are inserted to match.

Reeza
Super User
In your ordered list, how are controlling which gets run? Ordered lists just run in order of specification unless you have the conditional logic embedded in the program. Even then you'd have to ensure that the macro variable was created and available.
brookeewhite1
Quartz | Level 8

I have both tasks included in my ordered list. The Query B "All Claims" is listed first and the Query A "Only Paid Claims" is listed second. Since only one task is supposed to run they have the same destination filename. So based on what you're saying I think it is possible that both tasks run anytime the Ordered List is used, and since "only paid claims" is second it overwrites the initial results so that is always the result I see.  The prompt and condition are ignored. Is that right?

 

As for conditional logic, I have the Condition and related Prompt associated with the query tasks, but maybe that is not enough?

 

I didn't create a macro variable through a separate step.

 

Thanks for the help so far!

 

 

brookeewhite1
Quartz | Level 8

As a troubleshooting step, I reversed the order of the 2 queries in the ordered list.  Now I always get "all claims" instead of "only paid claims" regardless of what I select at the prompt.  Reverse problem. 

 

But good, since it tells us what is going on.

 

The ordered list is not using the conditional logic built in the process flow.  Is there a good fix for this?  Or do I just have to design my project in another way, to choose which query to run before I use the Ordered List for the rest of the project?

 

Thanks again!

 

Reeza
Super User
It depends exactly on how you have this set up ... which we don't know. Where are you using the prompt to control the code? I would have assumed you would have it at the top of each process flow and that would control if that one is done or not. So even though the ordered list operates that process flow it will not actually execute that code because you have a step in there to not use it.
brookeewhite1
Quartz | Level 8

I think the path of least resistance is to move the prompt and condition out of the ordered list and into a task that is completed before we start using the ordered list.  That way the logic proceeds correctly and is not overruled by the ordered list.  So that's what I'm going to try now...

 

Thanks for the help everyone!

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 6 replies
  • 1455 views
  • 0 likes
  • 3 in conversation