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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Problem with Fieldvalue() function

Hello

I want to extract the minimum date of one table (the dates are decimal fields in the DB) and use it fo make a for loop.

What I have done was:

TempMin:

  LOAD *;

  SQL

  SELECT min($(Date_Field)) as minDate

  FROM $(Table_Name)

  WHERE $(Company_Name) = $(company);

  let varMinMonth = FieldValue('minDate',1);

And I have always a null value in the varMinMonth variable, but when I put the field minDate in a TableBox it shows the correct value.

If I ceate one inline table, the result is OK

LOAD * INLINE [

English, German

Hello, Hallo

This is a test, Dies ist ein Test

];

let a =FieldValue('English',1);

Anyone can help me on this?

Thnak you

12 Replies
Anonymous
Not applicable
Author

Hi

I have tried but does not solve the problem.

Felipe

swuehl
MVP
MVP

So your SQL driver returns all field names in upper case.

You can rename the field name to mixed case in the preceding LOAD statement or just use the upper case field name in your FieldValue() function, whatever you like better.

mblumenroth
Contributor II
Contributor II

Hi Felipe,

ran into the same issue.

FieldValue only seems to work on columns that contain unique values.

My solution was to use the peek function, as originally suggested by Stefan.