Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Read a text field and store it into a variable

Hi,

Is it possible to read a field which is text from a table and store the text value into a variable that can be used later?

Say the field is called “FiscalYear” and it contains this data “2016-2017”.   How would I do this?   Many of the examples I see

deal with numeric fields to be used with functions like SUM(), AGGR() and etc. 

Thanks!

16 Replies
Highlighted
Partner
Partner

use the fieldvalue function

Highlighted

Store while reloading or on the front end?

Highlighted
Partner
Partner

or the peek function

Highlighted
Creator III
Creator III

I need to store the value while doing a LOAD ... from my SQL Server table.

Would you kindly include some code sample?

Highlighted

could please explain how you need to use this with an example ??

Highlighted

May be like this:

LOAD MaxString(FiscalYear) as Max

Resident Table;

LET vMaxFiscalYear = Peek('Max');

Highlighted
Specialist III
Specialist III

Hey there,

It is possible to insert a text in a input box that will overwrite a variable and then use that variable in a TextBox and every object you want. Hope this makes it clear

Best regards,

D.A. MB

Highlighted
Creator III
Creator III

Sunny,

I followed your code.  When I displayed the variable vMaxFiscalYear in a text object like:

= $(vMaxFiscalYear )

The text label shows a value of "2001".  My actual data is "2017-16".  What am I missing?

qv9.jpg

Highlighted

What happens when you use this: vMaxFiscalYear (Without dollar sign expansion?)