cancel
Showing results for 
Search instead for 
Did you mean: 

@prompt with case statement

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

Answers (0)