Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
// Load Variables from Variables tab
Load
Name
,Expression
,Comment
,Description
,Tag
FROM [($vManual)variables.xlsx]
(ooxml, embedded labels, table is [Variables-Labels]);
// Loop to generate a variable for each variable in the list
For i = 0 to NoOfRows('Variables_Labels') -1
LET Name = text(Peek('Name',$(i),'Variables_Labels')) ;
LET Comment = text(Peek('Comment',$(i),'Variables_Labels')) ;
LET Description = text(Peek('Description',$(i),'Variables_Labels')) ;
LET Tag= text(Peek('Tag',$(i),'Variables_Labels')) ;
LET '$(Name)' = text(peek('Expression',$(i),'Variables_Labels'));
Next i
In the Let '$(Name)', how can we load the previous assigned variables of Tag Description etc to the variable ?
Name | Expression | Comment | Tag | Description |
vlLanguage | =IF(vLang='FR','Langue','Taal') | Language Label | Language | Represents the language in which the document or information is written or communicated. |
vlDocumentname | =IF(vLang='FR','Nom du document','Documentnaam') | Documentname Label | Documentname | Refers to the name or title given to a specific document or file. |
AFAIK a variable has no TAG property (only fields and tables have it). A COMMENT property exists but it's not available from the script else only from the UI. In QlikView the variables-comments could be read/write per macros. In Sense it should be also possible with any API but I don't know which and how.
Beside this you may load your Excel directly within the data-model and providing the information in a table to give the users additionally insights.
Let vVariable_Name = Peek('Tag',$(i),'Variables_Labels'));
Let $(vVariable_Name) = text(peek('Expression',$(i),'Variables_Labels'));
Thanks for the reply. Unfortunately that doesn't work. The Tags and Description are still empty in the definition when I reload
AFAIK a variable has no TAG property (only fields and tables have it). A COMMENT property exists but it's not available from the script else only from the UI. In QlikView the variables-comments could be read/write per macros. In Sense it should be also possible with any API but I don't know which and how.
Beside this you may load your Excel directly within the data-model and providing the information in a table to give the users additionally insights.