Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reset field of inputfield

Hello,

I have several fields of type inputField and always and every time when they filled with do not regain the initial value of 0.

How do you open the document where the fields will inputField zero.

1 Solution

Accepted Solutions
Not applicable
Author

Hi Gleybson, I do not write in portuguesse but I am able to understand since I speak spanish, you are right it will only reset the first value of the inputfield, this one should reset all the values:

Sub setCampos

set fld = ActiveDocument.Fields("Custo")

fld.ResetInputFieldValues 0

end sub

Regards

View solution in original post

4 Replies
Not applicable
Author

Hi I think you may use a macro, triggered on open document event or triggered by a button in the application. Your macro code, might look similar to the following:

set fld = ActiveDocument.Fields("Budget")

fld.SetInputFieldValue 0, "0"

Regards

Not applicable
Author

Ivan,

a macro foi essa que coloquei

Sub setCampos()

set fld = ActiveDocument.Fields("Custo")

fld.SetInputFieldValue 0, "0"

end sub

Acionada atravez de um botão, mas não funcionou.

Not applicable
Author

Hi Gleybson, I do not write in portuguesse but I am able to understand since I speak spanish, you are right it will only reset the first value of the inputfield, this one should reset all the values:

Sub setCampos

set fld = ActiveDocument.Fields("Custo")

fld.ResetInputFieldValues 0

end sub

Regards

Not applicable
Author

Ivan, sorry, his name thought you were Brazilian.

well, this time it worked perfectly.

Thanks.