Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
leenlart
Creator
Creator

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
cwolf
Creator III
Creator III

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
dplr-rn
Partner - Master III
Partner - Master III

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

cwolf
Creator III
Creator III

Right click on a listbox with the inputfield:

InputField.png

cwolf
Creator III
Creator III

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

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

Gysbert_Wassenaar

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
leenlart
Creator
Creator
Author

Thanks, super interesting method.