Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Leverage your QlikView investment to modernize BI – see how! Join Group
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

insert value in field via macro


I am trying to create a macro to insert the value of a variable declared in QV in the fields of a column.

I tried this way but it is wrong

sub ChangeValue

     if ($ (variable) = "Y")

     ActiveDocument.Fields ("Field1"). SetContent "y"

     if ($ (variable) = "N")

     ActiveDocument.Fields ("Field1"). SetContent "n"

end sub

I am not good in VB script, can anyone help me? thanks