Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
boonhaw_tan
Creator
Creator

Select date using selectValues api

Hi All,

I have a multiple html pages mashup but i having problem to preserve current selection between html pages.

Thus, i tried to using browser sessionstorage method to store current selection made in page A then retrieve the selection from sessionstorage in page B and using selectValues api to perform pre-select.

I able to selectValues() for interger and text but i having problem to use selectValues for selecting date.

Kindly advice how can select date using selectValues.

app.field('customer_name').selectValues(["Peter"], true, true) -> working

app.field('year').selectValues([2014], true, true) -> working


app.field('date').selectValues(['1/7/2013'], true, true) -> not working


Thanks.

12 Replies
MichelW
Partner - Contributor
Partner - Contributor

Hi There,

sorry that i revive this thread, but i have a question regarding the selectValue() situation with the number (qNum) of date entrys within a field.

I am trying to select a range of values starting from 30 days ago from today.

That is all not a problem but, my field has entrys with timestamps which resolves as a xxxxx.xxxxxxxxxx pattern in the qNum part of the field.

Now the actual question is, how do i select entrys if i dont know the part after the "."

but just know the part in front of it?

what i was trying to do was like this:

app.field("someDateField").selectValues([array[0],......,array[29]]);

to select the entrys with the past 30 days. Well as you might expect, it didnt work out.

Since there are more then just 30 entrys infact it might be more then 30 entrys per day.

Is there any soloution to this problem?  Like a selectRange variant or wildcard selection?

 

Kind Regards

MW

kishore3k
Partner - Contributor III
Partner - Contributor III

Hi Jason,

Hope you are well!

The link( here  you have provided seem to be broken . Could you please provide the same again?

I have same issue where I couldn't select the date format fields using SelectValues API. Please check this thread- https://community.qlik.com/t5/Qlik-Sense-Integration-Extensions-APIs/Issue-in-SelectValues-Field-API...

addhyperlinkstopivottablenow

This should be added to the API docs!