Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
What is the command/syntax to input the data to textobject from vbscript. I want to print the values in the database table in to the text object.
Code is working fine using the msgbox. But not able to print in the text object.
Use a variable in the text box, for example:
=vText
and, it is easy to assign a value to this variable in a macro.
Thanks Michael,
I have tried it using the set content as well but not working. Also it is not one value the table has multiple values and it has to loop through. Any idea. Please suggest
A simple solution is to concat all your possible field values, and use the result in variable.
sub GetDataToTextBox
ActiveDocument.Variables("vText").SetContent ActiveDocumentEvaluate("concat(distinct, FieldName, '; ')") , true
end sub
Thanks Michael,
Please correct me if i am wrong. I feel the script will work only for the data already loaded in Qlikview. I am trying to establish the connection in macro and pull the data and try to put it in the textobject.hence it may not work . I am getting error while trying to run this script
That's correct, thanks.
And - yes, the data must be in QlikView for this to work.
Thanks Michael for the logic ,
I have used the similar logic by concatenating the strings using vb script and resolved the issue.
I used to do it in a loop in macro, but it was before the 'Evaluate" method was introduced. It helps to simplify a lot, not only in the cases like this.
More important - you've got it to work one way or another.