Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikView forum consolidation is complete. Labels are now required. LEARN ABOUT LABELS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to pass a value of a variable between the macro and the load script

Hello all,

I created a list box called 'site' and I want to take the last value selected in it.

I created a macro with a function which contains :

Function test()

     Set myvariable = ??? (I want to have the last value selected in the list box)

End Function

And in my load script I called the function :

Let myvariable = test()

If somone can help me !

Thanks.

1 Reply
Not applicable

I believe the function you are looking for is the GetFieldSelections

from the help text:

GetFieldSelections( fieldname [, valuesep [, maxvalues=6 ]] )

returns a string containing the current selections in a given field. Valuesep is the delimiter between selected values and defaults to ', '. Maxvalues is the highest number of individual values that will be displayed before 'x of y' notation is used instead.

Examples:

getfieldselections(Country)
getfieldselections (Country, ';' )
getfieldselections (Country, ',' , 10 )