Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

michielvandegoo
Valued Contributor

QV Components, add date variable

I'm adding new variables to the QV Components date variables.

Because I want to use a date island I tested in the GUI for the correct syntax and want to add this as new variables.

I want to create this new variable:

// Year To Date Productief Date island

Let $(_fieldPrefix)vSetYTDModifierProductiefDateIsland =

MapSubString('_qvctemp.Calendar.EscapeCharsMap',

'$(_vClearFieldList)

$(_f_DateSerial) = {">=$(=min(_DateIslandSerial))<=$(=max(_DateIslandSerial))"},

$(_fYear) = {"@(=$(_qvctemp.vMaxModifier)$(_fYear)))"}

,$(vProductieveUren)

'

);

Adding a new part in the variabel ,$(vProductieveUren) works as needed but I cannot get the DateIslandSerial part working.

The variable resolves in the fron end to >=<=.

I tried this:

$(_f_DateSerial) = {"@(>=$(=min(_DateIslandSerial))<=$(=max(_DateIslandSerial)))"}

and I tried placing the whole part {">=$(=min(_DateIslandSerial))<=$(=max(_DateIslandSerial))"} into another variable but the result remains the same.

Q: how do I need to format this part to resolve in the variable?

I'm using QV Components 10.1.

Tags (1)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: QV Components, add date variable

Try this one: $(_f_DateSerial) = {">=@(=min(_DateIslandSerial))<=@(=max(_DateIslandSerial))"},


talk is cheap, supply exceeds demand
5 Replies

Re: QV Components, add date variable

have tried using Date# function like below, date format should be same as $(_f_DateSerial) and $(_f_DateSerial) should be in proper date format

{">=$(=min(date#(_DateIslandSerial,'DD/MM/YYY')))<=$(=max(date#(_DateIslandSerial,'DD/MM/YYYY')))"}

michielvandegoo
Valued Contributor

Re: QV Components, add date variable

Change the format doesn't do anything.

The result I see in the variable is still >=<=

The DateIslandSerial isn't visible at all.

MVP & Luminary
MVP & Luminary

Re: QV Components, add date variable

Try this one: $(_f_DateSerial) = {">=@(=min(_DateIslandSerial))<=@(=max(_DateIslandSerial))"},


talk is cheap, supply exceeds demand
michielvandegoo
Valued Contributor

Re: QV Components, add date variable

Gysbert, can you explain what happens with the $ and @.

Is this the escape character mapping?

MVP & Luminary
MVP & Luminary

Re: QV Components, add date variable

Yes, that's right.


talk is cheap, supply exceeds demand