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).
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.
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!
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!
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!
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.