Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Expression Date Range Button

Hi,

I need to create a button that when when clicked will set the Date to a specified range (range is calculated by an expression)

The problem the set range is not working.

Setting date >= X works [Expression is ='<='&v.Date.Enddate]

Setting date <= X works [expression is ='>='&v.Date.Startdate]

Setting date >= X AND <= X Does NOT Work [Expression is =('>='&v.Date.Startdate&' AND <='&v.Date.Enddate)]


I am using a Button object, Action 'Select in Field'

1 Solution

Accepted Solutions
tresesco
MVP
MVP

'AND' operator might not be required, try without that and proper quotes, may be like:

='(<='&v.Date.MAT.Enddate & ' >='&v.Date.MAT.Startdate&')'

View solution in original post

6 Replies
Kushal_Chawda

try this


='>=$(=v.Date.Startdate) <=$(=v.Date.Enddate)'

Kushal_Chawda

or

='>='& $(=v.Date.Startdate) & '<=' & $(=v.Date.Enddate)

Anonymous
Not applicable
Author

Hi Kushal,

Thanks for your suggestion unfortunately neither return any results.

using =('>='&v.Date.Startdate&' AND <='&v.Date.Enddate) the end date of 31/07/2017 does seem to get applied but no the start date, If I switch the dates around so the expression is =('<='&v.Date.MAT.Enddate&' AND >='&v.Date.MAT.Startdate) then the Start date of 01/08/2016 is applied but not the end date.

It's like it's only applying the expression part after the AND..?!?

Kushal_Chawda

Would you be able to share the sample?

tresesco
MVP
MVP

'AND' operator might not be required, try without that and proper quotes, may be like:

='(<='&v.Date.MAT.Enddate & ' >='&v.Date.MAT.Startdate&')'

Anonymous
Not applicable
Author

Many thanks Tresesco your solution is correct