03-28-2016 09:42 AM
I have done some research online and can not find any thing specific that explains how to do this, maybe it is not possible for SAS to handle. Here is the situation:
I built a stored process that has 5 prompts available to the user. The user wants to be able to pick any one or more of the promts. Since they may or may not populate the prompts, I did NOT define them as 'required' (in SMC). I am checking the length on each of the prompts to determine if a value is present and building the 'where clause' using this method.
The caviot..... the user wants to make it a requirement that at least ONE of the prompts is populated and it doesn't matter which one. If the run the stored process and have not entered any values, they would like a message returned that says "At minimum one prompt value must be entered". They would click 'ok' on this message box of just close it and be sitting at the same screen and be able to enter a value.
Can anyone tell me if this is possible to do in a SAS stored process? If so, can you explain the method I could use?
03-28-2016 10:06 AM
For the steps that are under your direct control, you can use a similar test to what you are using now:
%if %length(&prompt1 &prompt2 &prompt3 &prompt4 &prompt5) = 0 %then %do;
03-28-2016 10:38 AM
Thank you for your reply.... After the "Then Do;" is the method/code that I don't know how to handle
03-28-2016 10:29 AM
I don't think it's possible to do this with the default prompting interface. I haven't used information delivery portal much, but I assume it is very similar to Stored Process Web App.
But that's not quite the same as having the prompt framework catch the input error and prevent the stored process from runnning.