Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
Use case : I have to display a chart only when I have no selection at all on each field on a Table. Constraint : the fields in the table can vary.
Here is my solution :
In the script
//Initialization variable
LET vAffichageRestitPrevi = '-1'; //always true
//I get all my fields in the table through qvd metatata (easiest way in this case)
TMP_FieldName_MyTable :
LOAD
"FieldName" as "FieldName_MyTable"
FROM [$(v_QLIKMART)MyTable.qvd]
(XmlSimple, table is [QvdTableHeader/Fields/QvdFieldHeader]);
//loop to build my variable
FOR Each a in FieldValueList('FieldName_MyTable')
vAffichageRestitPrevi=vAffichageRestitPrevi & ' and GetSelectedCount('& a &')=0'
NEXT a
//I drop the temporary table
drop table TMP_FieldName_MyTable;
Then in the chart/Add-ons/ Data Handling/Calculation condition
:
=$(vAffichageRestitPrevi)
Displayed message :
='Please no selection on MyTable fields'
try to share exact script what you've tried, By seeing your expression in script is not computing since you are not using LET and SET properties.
Sorry : I have no issue and this works fine. This was just a tip if someone else has the same issue 😉