on 01-11-2011 9:55 AM
case
when @Prompt('Enter partner view','C',{'Country Wise','Network Wise'},mono,,,)='Country Wise' then @Prompt('Enter partner Country','C','Partner_Country\Countryname',mono,,,)
when @Prompt('Enter partner view','C',{'Country Wise','Network Wise'},,,,)='Network Wise'
then @Prompt('Enter partner network','C','Partner_Network\Partner_Name',,,,)
end
gives the result
enter partner country
enter partner network
enter partner view
the above statement gives me 3 prompts at the same time why so? however all the prompts view are conditional
I'm surprised it works at all. A, N and D are the options for data type.
All prompts should be the same to get only one requested prompt at run time. Also, I may be mistaken but I think the conditional nature of the prompts is what is stopping you getting prompted only once because it doesn't know which are conditional so it's letting you answer all three separately because it doesn't know which prompts you want to use. You can try setting them all to mandatory to show that they consolidate and this is indeed the issue in your case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark,
Can you please provide the solution code or example of what you are trying to say.
Even I'm getting all the prompts, where as my intention is to select a particular prompt only based on my CASE selection at run time.
How can all prompts be the same. If all were same why would I use CASE. The use of CASE is to have condition based on which the requisite prompt should appear.
Please shed more light into this.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.