Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm using an InputBox to use the variable in the script, but the variable in the Input Box is defined with an function expression as 'Num(GetFieldSelections(X))' and then in the script Qlik use the text of the function and not the value of the function.
What must I do, to have only a value
Did you use a LET statement?
Working with variables in the data load editor | Qlik Sense on Windows Help
Yes I use Let but I doesn't work
Do you still have the let in your script? Be sure to remove this line from your script.
You need any logic which stored the evaluated result as a fix value - maybe with any macro which assigned the value to another variable or which exports it in a text-file or Excel.
Hello, can you give me a link: how to create a macro and how to export in a text file?
thank you
You may use a table-chart without any dimension and just your variable-calculation as expression and then a statement like:
sub x
set obj = ActiveDocument.GetSheetObject("CH21")
obj.ExportEx "D:\test.txt", 1
end sub
to export it as txt or by using 5 or 6 as parameter as xls/xlsx.
A good source for such stuff is the APIGuide.qvw within your QV install-folder (by automation).
Hi,
I believe if you have a variable vTest = Num(GetFieldSelections(X)), you either need an equals sign at the beginning of your expression or you have to handle your call like this: $(=vTest).
Best regards Son
Hello PhanThanhSon,
no your solution doesn't work, I have a variable like vTest = GetFieldSelections and in the script I use $(=vTest), but when I load the script, Qlik doesn't find a value for the variable.
I find a solution for that and I need to use a Button and define a set variable with this button.
Best Regards
Frédéric S.
You will always need an external storing because the variables calculation-result exists only within the UI. As far as the reload is performed the UI is gone and it exists only the scripted parts which is by the variable just the value respectively the calculation-string.