Qlik Community

Ask a Question

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Chalun7
Contributor
Contributor

Selecting datefields through URL, And using Autocalendar field in URL

Hi,

I need help to build a straight URL-path with a certain selection made.

'https://qs-dev.intra.malmo.se/sense/app/82a9ba08-2322-4f7d-a40e-3e2eb4e10f6d/sheet/8a4f6fd1-6772-4c6...

Either I would like to use the selection as follow:
/select/Canonical_Date/"2021-03" 

Or, more preferably:
/Select/Canonical_Date.autoCalendar.YearMonth/'2021-mars'

However non of the above works.
I do get the correct result when using non date variables.
For example:
'https://qs-dev.intra.malmo.se/sense/app/82a9ba08-2322-4f7d-a40e-3e2eb4e10f6d/sheet/8a4f6fd1-6772-4c6...


select/Status/Plankö 

2 Replies
aaz
Employee
Employee

Hi @Chalun7 ,

try to remove the quotes from the selected values, you don't need them, and I believe that the field name `Canonical_Date.autoCalendar.YearMonth` will be translated to just `YearMonth`

so, in theory, `/select/YearMonth/2021-03` (even though I believe using `Canonical_Date.autoCalendar.YearMonth`would work too) should work, and if the date string have a numeric representation try using square brackets around it, ex: `/select/YearMonth/[2021-03]` 

 

ref link: https://qlik.dev/apis/javascript/app-integration

 

I hope this helps

Chalun7
Contributor
Contributor
Author

Thanks,

This took me one step closer. But still not all the way.

By using:
select/Canonical_Date/[2021-03]

I retrieve a selection that makes the correct selection in field: Canonical_Date

Chalun7_0-1615466175262.png

However, most of my page is built of the selection in the Canonical_Date.AutoCalendar.YearMonth (as seen in the top left corner)
I still need the receiver of the URL to click on the selection panel and make the only possible choice.

Chalun7_1-1615466208806.png

 

Once that is done in the Canonical_Date.AutoCalendar.YearMonth I get the correct result.

Chalun7_2-1615466229182.png

I'm not sure I understood the possible solution in your answer, the one with the theory behind YearMonth .

Maybe I can force Autocalendar to make selection itself, based on possible selections of the Canonical_Date selected values.