Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a table with four editable fields and I would like to make them empty by pressing a button.
I have read and tried several examples on the forum but they didn't worked.
Surely I'm doing something wrong but I do not know what.
Can anyone help me? thanks a lot
Hi Mattia,
You're refering to "Input fields"? in this case you can write a macro:
Sub ResetInputFields
SET fld = ActiveDocument.Fields("YourInputFieldName")
fld.ResetInputFieldValues 0
End Sub
The button just needs to call this macro with an External -->Run Macro action.
Hi.. please find attached. Is this what you are looking for?
Hi Mattia,
You're refering to "Input fields"? in this case you can write a macro:
Sub ResetInputFields
SET fld = ActiveDocument.Fields("YourInputFieldName")
fld.ResetInputFieldValues 0
End Sub
The button just needs to call this macro with an External -->Run Macro action.
i get error... the columns where I enter my data to be deleted are called: premi nazionali S/N, premi listing S/N .
so I want to first try with a column and I did:
Sub ResetInputFields
SET fld = ActiveDocument.Fields("premi nazionali S/N")
fld.ResetInputFieldValues 0
End Sub
but dont work
No, i have a table with fields where you can write
Hi Mattia,
that macro resets an inputfield and restores original values, it can't make it empty.
However, in ActiveDocument.Fields instruction you have to insert input filed's name, not column's name (that i think it's an expression, such as InputSum or InputAvg).
Elena
the names are the same because my column takes its name from the script where i have my inputfield
Not sure, but the following thread has a sample at the very end that might help:
http://community.qlik.com/thread/32005
Dear Mattia,
Kindly find attached QVW document,
Kind regards,
Ishfaque Ahmed