Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I am trying to create a what-if analysis document which will allow a user to select, say 3 parameters, and then enter what-if values for the selected parameters. Can someone point me to the right direction? I have attached "mock-up" a spreadsheet, hopefully showing what I am trying to do.
I am sure I am missing something here, but hat I have found so far in QV examples and documents is that what-if variables seem be fixed, and I haven't figured out how to accomplish what I want.
Hope this makes sense, and any help will be much appreciated.
Thank you.
Make a "inputbox for the input" ... meaning you have the user select exactly 3 parameters. In the inputbox, use 3 new variables for editing, say vEditP1, vEditP2, vEditP3 ... then create an action button "Submit", which only then will pass the 3 values into the correct 3 variables. You cannot make the inputbox dynamic ... the variables which are subject to edit are static ... but the action "Set Variable" can be made dynamic. The first field of that action is the Target Variable, and you can use a static text or a computed value .... here is where the solution comes from.
Do you know what I mean?
Looks like you want to solve this either with the help of 12 variables (one variable for each parameter) or with INPUTFIELD. If you have a fixed number of parameters to work on, create variables. In the GUI use a Inputfield-Object, where you can add all those variables together, row after row, for editiing.
If you have as many parameters as data rows, use the INPUTFIELD prefix in your load statement. This turns a column into editible in the frontend (either in a table-box-object) or inside a field-selection-box. Create the editible field as an additional field, which is a copy of the source file value - otherwise, once the user has started to edit values, he/she cannot distinguish between the original value and his modified value.
Key differences are: Variables are per user during a session, and you may also programmically set them. Input-Field values are per user and remembered for the next sessions, but cannot be set programmically only once.
Hope this makes sense
Hi Chistof,
thank you for your reply.
Just a quick question though, if I have a long list of variables, but would like to restrict a user to be able to select only, say, 3 variables and only enter input values for only selected variables. How should I go about doing that? The report that I am creating will have about 70+ parameters and variables, and I do not want to all of them in the document.
I have included a 'mock-up' QV document of what I am trying to do. Any suggestion will be much appreciated.
Make a "inputbox for the input" ... meaning you have the user select exactly 3 parameters. In the inputbox, use 3 new variables for editing, say vEditP1, vEditP2, vEditP3 ... then create an action button "Submit", which only then will pass the 3 values into the correct 3 variables. You cannot make the inputbox dynamic ... the variables which are subject to edit are static ... but the action "Set Variable" can be made dynamic. The first field of that action is the Target Variable, and you can use a static text or a computed value .... here is where the solution comes from.
Do you know what I mean?
GREAT. Thank you so much for your help.