Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

String value into a variable.

Hi Friends,

Can anyone help me with a Syntax for the below. Thanks in Advance.

@

How to assign the string value into a variable.

Example:  x="apple".  Here x is a variable name.

Regards,

Pooja.

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

=v&' ' & x

View solution in original post

11 Replies
sunny_talwar
MVP
MVP

Try this LET x = 'apple';

Not applicable
Author

Hi Sunny,


Thanks for the response but , I am not getting the answer. It shows "-" in the text object when i called that variable.


Regards,

Pooja.


sunny_talwar
MVP
MVP

Would you be able to share the application to check it out?

MarcoWedel
MVP
MVP

Hi,

maybe you can see the difference to Sunny's suggested solution in your application?:

LET x = 'apple';

QlikCommunity_Thread_217972_Pic1.JPG

QlikCommunity_Thread_217972_Pic2.JPG

hope this helps

regards

Marco

clondono
Creator III
Creator III

If you don't want to declare it in the load script, you can create a variable, you can update the variable with an input box

1.png !

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Make sure you used single (not double) quotes as Sunny specified.

For this assignment, you can also make it even simpler by using SET.

SET x=apple;

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

Not applicable
Author

Hi Sunny,

I have attached the qvw file. And let me know the possible  solution.

Actual expectation is:

LET v=10;

LET x='apple';

Result in Text Object should be:  10 apple

Thanks,

Pooja

sunny_talwar
MVP
MVP

Try this:

=v&' ' & x

Not applicable
Author

Hi Sunny,

Thanks for your quick response. Got the result as expected. I like to know the difference between defining the  variable in script level and in design level(settings->variable overview).

Thanks in Advance,

Pooja