Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Textbox Expression as Variable

Hi All,

I have a textbox which has an expression to bring back the results of an expression,

Is there anyway to use that result in another expression? I have searched through the threads and seen GetFieldValue() but nothing seems to work.

If it is a lost cause, what alternatives do people use?

Thanks Again


Toby

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Toby

If your expression was

    today()

Then you could set that as an expression :

    set vToday = today() ;

And display it in a Text Box using a dollar expansion :

    = $(vToday)

And in a second Text Box reuse the dollar expansion and add 22 days to it :

    =date (  $(vToday) +  22 )

See mock up qvw attached.

View solution in original post

9 Replies
Not applicable
Author

Post up an example if you can

Not applicable
Author

Hi Joe

Example would be that I have a text box which produces a value of 10.

I then want to reference that result of 10 in another expression.

Is this possible?

Toby

Anonymous
Not applicable
Author

Toby

If your expression was

    today()

Then you could set that as an expression :

    set vToday = today() ;

And display it in a Text Box using a dollar expansion :

    = $(vToday)

And in a second Text Box reuse the dollar expansion and add 22 days to it :

    =date (  $(vToday) +  22 )

See mock up qvw attached.

awhitfield
Partner - Champion
Partner - Champion

HI Toby,

sorry if I have misunderstood, but can't you just incorporate the text box expression elsewhere? Or use the text box expression results stored as a variable?

Andy

Not applicable
Author

Hi Andrew

The storing as variable thing I think is the answer but being new I am still learning the ropes (I have Business Objects background)

Toby

Not applicable
Author

Thanks Bill I have had a quick play but either the Friday fatigue or stupidity but where do you declare the expression?

Mine is

count({<DateRaisedIMS={"=Year(DateRaisedIMS) = year(Today())"},ValueID={'*24*'}, IncidentType={'*Accident*'}, ListTitle={'*Employee*'}>}ValueID)

Not applicable
Author

Just worked this out so thank you Bill!!! You are a legend!

awhitfield
Partner - Champion
Partner - Champion

Glad you managed to sort it! Have a good one 

Andy

Not applicable
Author

Thanks Andy and thanks for taking the time to answer my question

Have a great weekend.

Toby