Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Inputfield

Hi everyone,

Just wonder if some of you had this issue with input fields, and if yes, did you manage to find a solution?

Inputfield A;

Load A from test.qvd

Then on the server say you change one row of the inputfield A from 1 to 10.

Thats fine and works fine. However when you load again the script, the field that you just made changes doesn't go back to the original value (which it was indeed what would I Expect.

Kind Regards,

Eliano

1 Solution

Accepted Solutions
Not applicable

Re: Inputfield

reset Input field with a macro.

go to Document-->Trigger-->On post reload

Add action --> run macro code

sub resetinput

dim x(1)

x(0) = 0

set fld = ActiveDocument.Fields("A")

fld.ResetInputFieldValues 0, x

end sub

here A is your inputfieldname.

5 Replies

Re: Inputfield

That's correct. Inputfield values persist over reloads. As far as I know the only way to reset them is with a macro, but that most likely doesn't work in the ajax client.


talk is cheap, supply exceeds demand
Not applicable

Re: Inputfield

Can you explain how can I reset it with a macro?

I think i found another way to solve the issue.

Just trying at the moment.

Not applicable

Re: Inputfield

reset Input field with a macro.

go to Document-->Trigger-->On post reload

Add action --> run macro code

sub resetinput

dim x(1)

x(0) = 0

set fld = ActiveDocument.Fields("A")

fld.ResetInputFieldValues 0, x

end sub

here A is your inputfieldname.

Not applicable

Re: Inputfield

Thanks.

Not applicable

Re: Inputfield

If this macro code helps you and solved your problem, then mark it as correct or helpful, and close this thread.

Community Browser