Can anyone help. I want use a ‘User’ Input in a calculation. For example the user will enter 2 dates. These 2 user inputs will be used in a “IF statement”.
How can I store a user input so that I am able to use it in equation or have the ability to manipulate it.
Use UserResponse() function to get a value entered by a user in a prompt.
You can also create a report level variable that will use UserResponse() function. Then you use the new variable instead of the function, if it’s more convenient.
eg. UserReponse (“Enter a date”) within a Dimension Object. If I bring this object into the report should I expect a User prompt to appear. To be honest unsure how to configure the UserReponse function.
Make it simple, In menu bar-- Insert–>Special Field–>Query Prompt and then select which prompt value you needs to display on report. If you need a variable to be created, copy the formula from the inserted cell and create variable .
Its OK working now. Only problem now is it seems, that when I use the UserResponse function to capture the User’s date Input , it converts this to a “Detail” object. I unable to compare/calculate this with a DIMENSION (date) . How do I convert the “Detail” date object into a Dimension date or another method so I can do a date calculation on the detail object.
If I remember correctly, result of UserResponse() is always a detail object. But it should not be a problem. You should be able to compare it with a dimension object without a problem.
The problem that I see is that you want to compare the result of UserResponse() with a date. But the function gives you a string. So first you need to convert the string to a date (using ToDate() function) and then compare it with a dimension object of a date type.