Need All in Number Field Prompt

Hi,

I have a prompt at the universe level and the field is a number field. Now I need to implement the logic wherein if users selects 1 , all accounts should be displayed, it is similar to All option but as this is a number, there is some issue which I am not able to understand, could someone please guide me ?


aniketp :uk: (BOB member since 2007-10-05)

Hi,

Please post what you have already tried.

And what do you mean by “there is some issue which I am not able to understand”? Give us more details.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Hi Marek,

Thanks for your prompt response on this. The below is a code I am trying to use-

(@Select(V Id Party By User\Id Acct Seq)  in @Prompt('SQACCOUNT','A',,multi,free) OR ( '1' in @Prompt('SQACCOUNT,'A',,multi,free)))

And it is giving error - Invalid Defination. Error parsing first parameter.

Edit: Hi Marek, the below one is working but I have not still tested it-

(@Select(V Id Party By User\Id Acct Seq)  in @Prompt('SQACCOUNT','A',,multi,free) OR ('1' in @Prompt('SQACCOUNT','A',,multi,free)))

But I have a confusion here, shall I do it by creating a new object like generally we do for " All" or this is fine if I go ahead with this solution? Kindly guide me…


aniketp :uk: (BOB member since 2007-10-05)

Hi,

You mentioned that it’s a prompt for a number field. However, the above code is for a prompt for a string field - you use ‘A’ as the 2nd parameter of the @prompt() function, as well as ‘1’ as the “ALL” value.


Marek Chladny :slovakia: (BOB member since 2003-11-27)

Yes Marek, actually that is my confusion. See here 1 and all both are working but the field is number, then how come All seems to be working here?


aniketp :uk: (BOB member since 2007-10-05)

Hi Aniket,

The ‘ALL’ seems to be working because you are using ‘A’ as the data type in the @Prompt(,‘A’,) definition. If you use ‘N’, ‘ALL’ will not work.

Cheers,
Ranjul


ranjul.gupta :india: (BOB member since 2008-10-16)

Very likely the database does internally an implicit conversion from number to string so at the end strings are compared, not numbers.


Marek Chladny :slovakia: (BOB member since 2003-11-27)