Hi is there a way to only allow the slider to step by month.
I.e. I have a slider which currently gets its range of dates from a variable, when a user moves the sldier control i only want it to go to the first of each month as opposed to the dates in between.
Is this possible
Thanks
Hi,
That was the next thing I was going to suggest! Well done.
If your floating field is called MonthStart then:
Min(MonthStart)
and
Max(MonthStart)
Will give you the values you need. You can feed those into an If statement:
if(date >= Min(MonthStart) and date <= Max(MonthStart), 1, 0)
Or in a dollar expansion:
$(=Min(MonthStart))
for use in a Set.
Stephen
If you only want the First of the month on a selector, use the MonthStart function to create a field that contains the first of the month for all dates.
Stephen
Hi,
I control the Min and Max dates by the date range that is loaded up, I then store the selected dates in 2 variables which calculates a chart. If I use the monthstart function when a user chooses the dates they are still allowed to select dates in between each month. Is there a way only to enable it to step by month
Thanks
Hi,
I am not 100% sure about what you are trying to achieve. Maybe you could share a QVW?
I am attaching one that may ilustrate what I was talking about. It might not be exactly what you wanted, but it might give you an idea?
Stephen
Hi Stephen,
Thanks for the attached example, basically what I am trying to achieve is not to have the slider control acting as a filter as such, instead I have a variable set up which is calculated based upon the the selections within the slider. If I give the slider a field then the data will be filtered based upon that selection, however I dont want the data to filter based upon the selection I only want the variable to be calculated. Does that make more sense?
Thanks
Hi Stephen,
Thanks for the attached example, basically what I am trying to achieve is not to have the slider control acting as a filter as such, instead I have a variable set up which is calculated based upon the the selections within the slider. If I give the slider a field then the data will be filtered based upon that selection, however I dont want the data to filter based upon the selection I only want the variable to be calculated. Does that make more sense?
Thanks
Hi,
I have added a seperate Monthstart (fieldname) so it wont be linked, I am now able to use the slider control.
Just one last bit of advice, how can I refer to the dates selected on the slider? i.e. the min date selected and the max date selected as my variable calculation is based on data inbetween the range of selected dates
Thanks for your help Stephen.
Hi,
That was the next thing I was going to suggest! Well done.
If your floating field is called MonthStart then:
Min(MonthStart)
and
Max(MonthStart)
Will give you the values you need. You can feed those into an If statement:
if(date >= Min(MonthStart) and date <= Max(MonthStart), 1, 0)
Or in a dollar expansion:
$(=Min(MonthStart))
for use in a Set.
Stephen
thanks