
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Using an Input Box for Script
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
- « Previous Replies
-
- 1
- 2
- Next Replies »

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you use a LET statement?
Working with variables in the data load editor | Qlik Sense on Windows Help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I use Let but I doesn't work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you still have the let in your script? Be sure to remove this line from your script.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, can you give me a link: how to create a macro and how to export in a text file?
thank you


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- « Previous Replies
-
- 1
- 2
- Next Replies »