Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select a date or use input field

Hello, in order to sort my datas, I'm using different selection lists with the years, the months and the weeks. Moreover, I would like to use two input field where the user can determine himslef the period of calculations.

Therefore, I would like that when the user select, let say, a week in the selection list, that the two variables of the input fields adapt themselves to the new selection with min and max values. How could I proceed?

Thanks!

26 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

I have to give Credit to Colin Albert (

v1.1

By Colin Albert

K3FDS)

Not applicable
Author

Hy, so it took me some time to understand how everything works but I finally got it

However, when I apply the DateRange, my datas are not filtering I really don't know what going behind that...

In order to get this filter, did you something special somewhere:

currentselections.png

Moreover, I don't understand this part in the script (maybe that's why it doesn't work):

Directory;

load *,

  Date(ENDV_DATE) as JD_DATE;

LOAD ENDV_CCLIENT, etc

why do you need two different loads?

jpenuliar
Partner - Specialist III
Partner - Specialist III

However, when I apply the DateRange, my datas are not filtering I really don't know what going behind that...

have a look at Document Properties(CTRL ALT D)>Triggers, if you look at Variable Event Triggers> vDateRange has an "OnChange" action. that is how i trigger the field selection.

Moreover, I don't understand this part in the script (maybe that's why it doesn't work):

Directory;

load *,

  Date(ENDV_DATE) as JD_DATE;

LOAD ENDV_CCLIENT, etc

why do you need two different loads?

Answer: not really necessary but to me it makes scripting more organized.

Bottom load loads data from data source,

Top load, this is where i add/transform fields or flags, or counters.

you can loads as many as you can.

Not applicable
Author

I didn't check that property so that's why... Si, now I added that trigger to the variable but, for no reason the field JD_DATE is not filtering... The text box with the variable vDateRange is changing whenever I change the start or end date, but JD_DATE remains with all the value 😕

jpenuliar
Partner - Specialist III
Partner - Specialist III

keep in mind, qv is a bit case sensitive.

not sure what else is causing your issue.

Not applicable
Author

I finally got it, my variable was in a different 'state'. Now it works perfectly

Thanks a lots for everything!!

jpenuliar
Partner - Specialist III
Partner - Specialist III

Ho about adding an action to the "Aplpy Date Range Button@ instead,

Action: "Select in field"

Field: JD_DATE

Search String: "='>=$(=date($(vStartDate))) <=$(=date($(vEndDate)))'"

this way you don't make of use of Onchange trigger