Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Clear input field value via macro

Hi everyone,

i'm working on a QV where i have a simple table with an inputfield column.

I was wondering if smbdy would knew a VB or Java command to clear inputfield value, or force it to 0 for the active selection??

thanks for help

8 Replies
Not applicable
Author

Here is a sample code.

set fld = ActiveDocument.Fields("Budgetentry")

fld.ResetInputFieldValues 0

Hope that helps.

Philippe

Not applicable
Author

Hi thanks for the quik replys, however, i tried that but this one enable to restore the value of the input field, not to clear it or force it to 0.

Not applicable
Author

I am using that macro to reset a straight table with inputsum cells in it . And it resets it to 0.

Philippe

Not applicable
Author

Try it with this file:

Input.zip

There is a sample like Phillipe mentioned.

Kind regards,

Björn

Not applicable
Author

Well, i see now why this command doesn't work for me!!

Actually, my inputfield takes his values from an Xls file (to avoid losses of values, due to the inputfield issue: when adding some lines, the input field keeps it position and does not work as it should! i guess you understand what i m talking about.), and when i execute the macro, it takes the last known value since last reload and does not force it to zero as it work in your example when their is no source for this inputfield.

So because of that, i can't find any good command to force my input field value to be 0. any ideas?

Not applicable
Author

Hi,

Could u plz tell me how to reset the input fields on pressing Clear on the toolbar

Thanks

chandashok
Creator III
Creator III

hi TheSariP

     Hope the following macro attached qv file will be helpful for your problem

Regards

Ashok

chandashok
Creator III
Creator III

Hi qlik_techie,

     Hope the above attached file will be give some idea to reset your input field using macro

     Regards

Ashok