Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
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.

1 Solution

Accepted Solutions
sunny_talwar

Try this:

=v&' ' & x

View solution in original post

11 Replies
sunny_talwar

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

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

MarcoWedel

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

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

Try this:

=v&' ' & x

View solution in original post

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