prompt input to variable

Hi,

how to pass prompt input to Variable and use this variable in another expression.
Could anybody explain with example.


ravik (BOB member since 2004-06-02)

In BO Tool bar use Insert --> Special Field --> Query prompt

This will bring the prompt input into a variable.
var = UserResponse(“DP1”,“Prompt Name”)

Now in other variable var1 = if (var = “01”) then “1” else “0”)

Hope it helps


JaiGupta (BOB member since 2002-09-12)

Do you want to do this in Reporter or Designer?

For Reporter use the function: UserResponse
For Designer use: @Prompt or @Variable


Andreas :de: (BOB member since 2002-06-20)

Hi
Thanks for thr prompt response.

How to pass prompt input to Variable and use this variable in another expression in uneverse using @prompt and @variable

The syntax for @variable shows that
@Variable(‘myname’) References the value assigned to a prompt or variable.

Can anybody explain with example “@Variable(‘myname’) References the value assigned to a prompt”


ravik (BOB member since 2004-06-02)

Ravi – I think you might be mixing Designer and Reporter functionality up.

In Designer, the @Variable function is used to call the value assigned to one of two types of variables:

1.) BusinessObjects System Variable – example: @Variable(‘BOUSER’) to find out the BusinessObjects user name

2.) Personal text file variable – using a value stored in a personal text file, which is read when an instance of BusinessObjects is started, and the
value is stored in memory. You use @Variable function in the Where clause of an object to reference a variable in an associated text file. This allows you to define user specific conditions on an object. To use this variable, BUSINESSOBJECTS needs to be launched by a command line
that includes the -VARs parameter.


To make use of the prompt value in a Variable – sounds like something you’d have to do in Reporter, not Designer.


Anita Craig :us: (BOB member since 2002-06-17)

Hi,

‘Query prompt’ not enabled to use in my report.


ravik (BOB member since 2004-06-02)

Ravi – did your query create a prompt which you then answered? If not, then “Query prompt” should be greyed-out – there isn’t any.


Anita Craig :us: (BOB member since 2002-06-17)

Ya. I am checking ‘Query Prompt’ with out creating prompt.

var is of string type (Detail)only.
Will it possible to use it as numeric measure in other caluculation


ravik (BOB member since 2004-06-02)

Use the Business Objects Reporter function ToNumber to convert a STRING into a NUMBER.


Andreas :de: (BOB member since 2002-06-20)

How to get the prompt value in Universe Design? I want to store the prompt value in a variable and use it in another place.


anywhere (BOB member since 2006-04-10)

Hi Anita,

Can we catch the value of cascading prompt in @Variable?

Actually, as we all know while using cascading prompt, only value from last level of prompt is appeared in where clause.

For eg. there are three prompts which is having cascading effect

  1. Country?
  2. State?
  3. District?

so when we go through SQL, only District values appeared in where clause.

Actually we also want to show Country and State in where clause.

We tried find out the solution on BOB, but didnt get answer.

Can @Variable helpful in my scenario.

Thanks in advance…


amar12312 :india: (BOB member since 2008-05-13)

Short answer: No.

Longer answer: you might want to check the various tools. I know Deski and Webi do not, but I think Crystal can access all of the different prompt levels.


Dave Rathbun :us: (BOB member since 2002-06-06)

Thanks for prompt reply…

Actually my client want to switch to crystal just because of this and few more reasons.

Thanks Dave…


amar12312 :india: (BOB member since 2008-05-13)

I’m having a problem using the prompt input to calculate another variable. I’d like to subtract 2 dates (or DaysBetween). One of the dates is a prompt input and the other is an object. I’d prefer to build this in the universe but have had little success.

The prompt is built in the universe as: @Prompt('Reporting As of Date: ',‘D’,mono,free,Not_Persistent,)

When I attempt the function below in the report it get an Invalid data type error. I have confirmed that the Open Date is a date data type and I have confirmed that I am able to see the UserResponse (ex: 4/30/2009 12:00:00 AM).

=DaysBetween([Open Date];UserResponse("Reporting As of Date: "))

If I attempt to convert the UserResponse to a date, I get a #ERROR.

Any suggestions?

Based on this thread, it seems it must be calculated in Webi rather than the universe, so, this probably belongs under WebI but it seemed to fit this thread and I’ve found few other threads with similar topics.

Thanks,
Wendy


wendyh (BOB member since 2005-11-22)

UserResponse() always returns a character string. To use it in the DaysBetween() you have to first retrieve the user response, then convert it to a date.


Dave Rathbun :us: (BOB member since 2002-06-06)