Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display possible selection

Hello everybody,

I want to display in my macro a possible value of list selection, i know fonction like Getfielfselection(field), but is there a function to get a possible value (white color value)?

Best regards.

1 Solution

Accepted Solutions
Not applicable
Author

Hu Attalah,

Try with something like following:


=concat(distinct YourField, ', ')


Regards.

View solution in original post

8 Replies
Not applicable
Author

Hu Attalah,

Try with something like following:


=concat(distinct YourField, ', ')


Regards.

Not applicable
Author

Thx Miguel your solution work.

Rgds.

Not applicable
Author

I want use cancat expression in a if, something like:

if( GetPossibleCount("Activity status")=1 and concat(distinct Myfield,', ')<>'Ok')

then ....

end if

Why The concat dont work in this case?

Not applicable
Author

Hi Attalah,

Certainly, I don't know what are you looking for, could you be more specific?

I've make the following example and it works:


=If(Concat(MyField,', ') = 'Ok', 1,2)


Regards.

Not applicable
Author

I want to use concat in a macro, is it possible?

Not applicable
Author

No, you can't but you could use a variable using the concat expression and read the result in the macro code.

Regards.

johnw
Champion III
Champion III


Attalah Abdelhamid wrote:I want to use concat in a macro, is it possible?


You can use activedocument.evaluate() to get the value of normal QlikView expressions. So you should be able to use this in a VB macro:

activedocument.evaluate("concat(MyField,', ')")

Not applicable
Author

Hi john,

Finaly i have used a variable, and my code becomes:
set vok = ActiveDocument.Fields("Mill status").GetPossibleValues
if (vok.count=1 and vok.Item(0).Text="Ok") then
XLSheet.Range("A1").Value="All Mill status = Ok"
XLsheet.Cells.EntireColumn.AutoFit
XLsheet.Cells.EntireRow.AutoFit
else
table.CopyTableToClipboard true 'Copy data to Clipboard
XLSheet.Paste XLSheet.Range("A1")
XLsheet.Cells.EntireColumn.AutoFit
XLsheet.Cells.EntireRow.AutoFit
end if