Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
patroser
Partner - Creator
Partner - Creator

Reset Inputfield values

Hi there!

I got stuck with a little problem concerning my input fields.

I use them for budgeting.

I use the following macro to clear the fields.

Sub ResetInputField

' Reset the InputField

  set fld = ActiveDocument.Fields("InputFieldName")

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

End Sub

Unfortunately it doesn't work on access point.
So I also already tried to reset the field within my partial reload.
But after dropping the field and rejoining it within one partial reload, the application still keeps the values of the input fields.

Is there any clear way to reset the value of the input field within the script or at least without a macro (or a macro that works on AJAX)?

Thanks in advance!

Best regards
Patrick

1 Solution

Accepted Solutions
sunny_talwar

You can use a bookmark and a button action to reset inputfield values to something specific. For instance if you want all the values to be 0, then enter 0's for all of them and create a bookmark as follows (make sure to select include Input Field Values, and exclude Include Selections in Bookmark)

You can then use this bookmark to reset the inputfields to 0.

HTH

Best,

Sunny

View solution in original post

13 Replies
sunny_talwar

You can use a bookmark and a button action to reset inputfield values to something specific. For instance if you want all the values to be 0, then enter 0's for all of them and create a bookmark as follows (make sure to select include Input Field Values, and exclude Include Selections in Bookmark)

You can then use this bookmark to reset the inputfields to 0.

HTH

Best,

Sunny

patroser
Partner - Creator
Partner - Creator
Author

Works great, thanks!

sunny_talwar

Great, I am glad I was able to help.

Best,

Sunny

satishkurra
Specialist II
Specialist II

Hi Sunny

Thanks for this.

I'm looking for a similar kind of requirement.

The change is i want to reset back to the initial values.

I followed the same approach

1. Create a book mark with

     a. Uncheck Selections in Bookmark

     b. Check Include Input Field Values

Bookmark Name is BM01 for example

2. Now i'm creating a button with Action Type as Bookmark and Action as Apply Bookmark and provided the Bookmark ID as BM01

3. Now if i click the button it is not resetting to the initial value.

Am i missing something here.

Thanks in advance

Satish

sunny_talwar

The steps you have taken seems right. Can you share a sample to check it out?

satishkurra
Specialist II
Specialist II

Hi Sunny

Please find attached the sample qvw

Thanks

Satish

sunny_talwar

I am guessing you are not doing this error in your actual application

Capture.PNG

sunny_talwar

I created a new bookmark using the steps you just mentioned and it seems to be working well

satishkurra
Specialist II
Specialist II

Hi Sunny

Even after changing, if i click Clean Input Field text object, the input field clear is not happening.

Thanks for pointing out:)

Thanks

Satish