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.

k_burata
Contributor

Reload Script using selected date

Hi All,

I need to reload my data based on the date selected on the Calendar Object.

Created a button and put in action to set the variable = selected date and did a reload. Problem is doesn't seem to work. Am I missing something?

script:    

LOAD

IF ([DateFrom] < $(vSelectedDate) AND [DateTo] > $(vSelectedDate), 'T', 'F') AS Status 

Resident Table;

Button Action

     Set Variable: vSelectedDate value = CalendarDateField

     Reload

Thanks

1 Solution

Accepted Solutions
simone_spanio
Valued Contributor

Re: Reload Script using selected date

Hi Kim,

try to see my attachment and tell me if it's different from your.

You'd adapt the date format in order to have a match with your script.

If you can post a snippet of code or your application.

Let me know.

S.

4 Replies
MVP
MVP

Re: Reload Script using selected date

How does your variable looks like when you put it in an input box?

If it's a number and [DateFrom] and [DateTo] are interpreted as dates, it should work.

If it's not a number, but the formatted date text, but in your standard date format, try enclosing the variable in single quotes:

LOAD

IF ([DateFrom] < '$(vSelectedDate)' AND [DateTo] > '$(vSelectedDate)', 'T', 'F') AS Status

Resident Table;

As you see, it's probably a matter of value formatting and interpreting.

simone_spanio
Valued Contributor

Re: Reload Script using selected date

Hi Kim,

try to see my attachment and tell me if it's different from your.

You'd adapt the date format in order to have a match with your script.

If you can post a snippet of code or your application.

Let me know.

S.

k_burata
Contributor

Re: Reload Script using selected date

Thanks Simone.

Next challenge for me is to reload it in Acess Point.

I need to reload data using date selected in Access Point.

How do I do about this one?

simone_spanio
Valued Contributor

Re: Reload Script using selected date

Hi,

to reload from Access Point you need use EDX.

Take a look here: Using EDX in QlikView 11 - basic example

Qlikview 11 EDX

If you have problem please open a new thread dedicated to that issue

S.