Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
senarath
Creator III
Creator III

Assign two variables for Date range in Qlik Sense

Hi,

I'm in the process of migrating Apps from Qlik View to Qlik Sense. However most of my apps use selecting a date range by assigning two variables for date Start and date End which is possible in Qlikview. Most of expressions use both current period and corresponding previous period comparisons (current selection period Vs corresponding period)

I'm not yet able to replicate the same in QlikSense apps.

I tried to achieve the same status by using two extensions available in Qlik Branch namely Sense Date Range Picker and Calendar_DatePicker. But I later has a issue where it does not pick any value to the variables defined AND I have no idea as to how to get the corresponding period in Sense Date Range Picker

Would appreciate very much if anybody would advise or recommend a better way to overcome this situation.

Further, hope future releases of Qlik Sense would consider these requirements.

Thanks

Senarath

1 Solution

Accepted Solutions
Anonymous
Not applicable

For extension Calendar_DatePicker ,called Calendar Variables on Branch, I pasted below line 73 from file Calendar_DatePicker.js


    qlik.currApp(t).variable.setContent(layout.variableTo, valTo);


If you look at the Help for

https://help.qlik.com/en-US/sense-developer/3.0/Subsystems/APIs/Content/MashupAPI/Methods/set-conten...


You will see it says

     This method was deprecated in version 2.1. Use setNumValue or setStringValue instead.

And I am pretty sure this setContent method was completely removed in version 3.0.  Therefore the extension will need sorting to make it work in 3.0+

This serves as a reminder that the extensions on Branch are free open source extensions, but no support is provided for them or any guarantee they will work with new QlikSense versions.



View solution in original post

5 Replies
Anonymous
Not applicable

What version of QlikSense are you using ?

The reason why I ask that is I have a feeling that one, maybe both, of these extensions uses a deprecated API that has since been removed from QlikSense 3.0 onwards.

senarath
Creator III
Creator III
Author

Hi Bill,

I'm using Qlik Sense 3.0.1.

Thanks

Senarath

Anonymous
Not applicable

For extension Calendar_DatePicker ,called Calendar Variables on Branch, I pasted below line 73 from file Calendar_DatePicker.js


    qlik.currApp(t).variable.setContent(layout.variableTo, valTo);


If you look at the Help for

https://help.qlik.com/en-US/sense-developer/3.0/Subsystems/APIs/Content/MashupAPI/Methods/set-conten...


You will see it says

     This method was deprecated in version 2.1. Use setNumValue or setStringValue instead.

And I am pretty sure this setContent method was completely removed in version 3.0.  Therefore the extension will need sorting to make it work in 3.0+

This serves as a reminder that the extensions on Branch are free open source extensions, but no support is provided for them or any guarantee they will work with new QlikSense versions.



senarath
Creator III
Creator III
Author

Hi Bill,

Noted your worth note and thanks for the support

Rgds,

Senarath

ankurakash
Contributor III
Contributor III

Hi Senarath, 

Please update the thread with the solution that finally worked for you in Qlik Sense! I am also in similar situation where I am trying to replicate QV variable to QS where date range is defined however it is throwing garbage error.

Can you update the thread with solution steps. Thank you!!