Difference between @variable and @prompt

Can some-one please list down all the differences between @variable and @prompt.

Many thanks for your help

Kind Regards.


godgift :india: (BOB member since 2004-07-09)

Well, see Marek’s answer to this question here.


Jansi :india: (BOB member since 2008-05-12)

Is that the only difference?

Kind Regards,
Yeheya


godgift :india: (BOB member since 2004-07-09)

A prompt asks for input, a variable provides you with output.

The @Prompt functionality is designed to solicit a response from the use, the @variable functionality is more rigid.

I’ve posted this elsewhere on here today, but worth doing again…

But I believe you can use @variable to take input from user. Is that not correct.

Thanks again for helping me out

Kind Regards.


godgift :india: (BOB member since 2004-07-09)

That can be done, I use @variable in SQL data providers as @prompt gives errors

so long as the text is the same, only one prompt message will be shown at run time


Ottoman :uk: (BOB member since 2002-10-04)

Mak 1’s post in the suggested link answers this.


Jansi :india: (BOB member since 2008-05-12)

Then probably the @prompt() function is not configured properly

The problem with using @variable() function for a prompt is:

  • you don’t have an LOV in the prompt
  • it’s always a “free” prompt, so a user can’t be limited to select only a value from an LOV
  • it accepts only 1 value, so multi-valued answer in the prompt is not possible
  • you don’t get a date picker if the prompt ask for a date
  • you can’t set a default value

As I said many times before, if you need a prompt in a report, use @prompt() function. And if you need a system/application value then use @variable() function.


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

Many thanks Marek. This is exactly what I was looking for - a complete list of difference.

Thanks again

Kind Regards.


godgift :india: (BOB member since 2004-07-09)