Skip to main content
Announcements
NEW Customer Portal: Initial launch will improve how you submit Support Cases. FIND OUT MORE
Jennell_McIntire
Employee
Employee

A few months ago, I worked on a ROI Calculator project that allowed me to use QlikView in a way that is not often used.  In this application, users entered various data and assumptions into input boxes that were then used to calculate some financial figures in the script.  One requirement of the application was that users were able to save the assumptions/scenarios they entered and load these scenarios at a later time as a starting point or basis for other scenarios.  I thought I would share how I used input boxes, variables and reloads to fulfill the requirements.

In this example, I simplified the application so that I could focus on what is being done and not so much the calculations in the script.  In the example I created, students can enter their grades to see their average score.

UI.png


Once they enter their data they can click the Save button to store what they entered into a QVD.  Users can also use the Load saved scenario button to select a previous entry to display in the input boxes.  When users click the Load saved scenario button, they are prompted with the window below where they can select the scenario they want to display in the input boxes.

window.png

Reloads are used often in this application to either get the scenario the user wants to see from the scenarios QVD or to save the data entered into the scenarios QVD.  Variables are also used a great deal in the input boxes like this:

input prop.png

There is a variable for each input box on the user interface.  There are also various variables used to determine what action the user would like to perform.  For example, in the script the first thing I check for is whether the user wants to load a selected scenario.  The vLoadScenarios variable is set to 1 when the user clicks the Load saved scenario button.  When vLoadScenarios is equal to 1, the data for the selected scenario is loaded and the variables used in the input boxes are set to the saved values.  Then all the scenarios are loaded into the application.

script.png

Other parts of the script handle creating a table with the entered data and storing it into a QVD.  To view this example application in action and to see the full script, check out my technical brief.

Using input boxes in this manner provides ease of use when entering data.  In the case of the ROI Calculator application, there was several input boxes so being able to use previously entered scenarios as a basis for new scenarios allowed users to “tweak” or make a few changes to their assumptions to determine the ROI impact.

Thanks,

Jennell

24 Comments
rustyfishbones
Master II
Master II

Another very useful post

Thanks for sharing Jennell

Alan

0 Likes
2,538 Views
Anonymous
Not applicable

This kind of post is want the comunity (or just myself) need. Short, concrete, with exampes and related QVW attached or linked. Thank you Jennell. I wish others follow you. Carlitos.

2,538 Views
Not applicable

I found this very useful, and was able to immediately implement this into one of our reports based on our post.  This only works for me on the desktop version of QlikView.  Is it possible to have a button Reload the script on the web version in AccessPoint?

0 Likes
2,538 Views
Renato_Vieira
Employee
Employee
2,538 Views
Not applicable

Renato Vieira, Thanks for the link!  Hmm...it looks like I would have to shell out $21k for Publisher to make this work.  Not on my budget

0 Likes
2,538 Views
Not applicable

Is it possible to save the data to QVD without actually reloading the QVW?

0 Likes
2,538 Views
Jennell_McIntire
Employee
Employee

Matthew,

No, you are not able to save the data without reloading the QVW.  You have to run the script in order to run the store statement that is used to save the data in a QVD.

Jennell

0 Likes
2,121 Views
Not applicable

Thanks Jennell. I guess the only option for write back without reloading the qvw is to use macros. We were exploring different options how to save the data without the need of having to rely on macros or reloading the document.

Matt

0 Likes
2,121 Views
ali_hijazi
Partner - Master II
Partner - Master II

But does this work on a live document deployed on the QlikView server? according to my knowledge users cannot reload a document on the web no?

0 Likes
2,121 Views
ali_hijazi
Partner - Master II
Partner - Master II

we can enable Dynamic data update and use insert statement to the desired fields and I think this will work too on deployed documents to QlikView server

0 Likes
2,121 Views