Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Reset an inputfield by script (with button)

Hello, 

We have a little QV app that calculates values for the cost management team but allows them to modify the value.  

I have a table with [calculated_value] and [costers_value] that is loaded with [costers_value] as an inputfield.  

When the app is loaded, the [costers_value]  is set to = [calculated_value].  

The cost management team would like to have a button to reset the [costers_value] to the [calculated_value] for example if they begin modifications and leave and don't know where they left off.  

It seems to me that I can create a button that will re-load the app, but doesn't the inputfield store the modified value, for how long, and how do I delete those values stored in memory ?  Maybe this should be part of my reload script ?

Any ideas are welcome!

Labels (2)
1 Solution

Accepted Solutions
Highlighted
Creator III
Creator III

Re: Reset an inputfield by script (with button)

But you can also use a button that calls a macro:

sub ResetInputField
         ActiveDocument.Fields("costers_value").ResetInputFieldValues 0
end sub

View solution in original post

5 Replies
Highlighted
Partner
Partner

Re: Reset an inputfield by script (with button)

Why dont you on reload set [calculated_value] to 2 variable costers_value and coster_value_default.

then use an on document open document trigger to set costers_value to coster_value_default.

Hope i understood the issue correctly

Highlighted
Creator III
Creator III

Re: Reset an inputfield by script (with button)

Right click on a listbox with the inputfield:

InputField.png

Highlighted
Creator III
Creator III

Re: Reset an inputfield by script (with button)

But you can also use a button that calls a macro:

sub ResetInputField
         ActiveDocument.Fields("costers_value").ResetInputFieldValues 0
end sub

View solution in original post

Highlighted
MVP & Luminary
MVP & Luminary

Re: Reset an inputfield by script (with button)

One way is to use a bookmark: https://community.qlik.com/t5/QlikView-App-Development/Reset-Inputfield-values/td-p/820866

 

Another way is a double reload. See my post in this discussion: https://community.qlik.com/t5/New-to-QlikView/InputField/td-p/1110139


talk is cheap, supply exceeds demand
Highlighted
Contributor III
Contributor III

Re: Reset an inputfield by script (with button)

Thanks, super interesting method.