Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to reset input field values using macro

hi

i want to reset the  value  of a field dynamically.

thanks

1 Solution

Accepted Solutions
er_mohit
Master II
Master II

try this

sub resetinput

dim x(1)

x(0) = 0 ' element to reset

set fld = ActiveDocument.Fields("NewPrice")

fld.ResetInputFieldValues 0, x ' 0 = All values reset, 1 = Reset Possible value, 2 = Reset single value

end sub

here NewPrice is my inputfield

so, you only generate an action eithe through button or on post data..

i attached file also.

hope it helps...

View solution in original post

2 Replies
er_mohit
Master II
Master II

try this

sub resetinput

dim x(1)

x(0) = 0 ' element to reset

set fld = ActiveDocument.Fields("NewPrice")

fld.ResetInputFieldValues 0, x ' 0 = All values reset, 1 = Reset Possible value, 2 = Reset single value

end sub

here NewPrice is my inputfield

so, you only generate an action eithe through button or on post data..

i attached file also.

hope it helps...

Not applicable
Author

hi mohit

its working fine. thanks for quick reply