Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have created a textbox button with the following statement:
='(>=' &YearStart(Today())& ' and <='& date(Today()) &')
or
(>=' &YearStart(Today(),-1)& ' and <='& AddMonths(Today(),-12) &')'
Result text-string:
(>=01.01.2013<=22.08.2013) or (>=01.01.2012<=22.08.2012)
This result is a parameter in a text box --> action --> selection in field
So far so good.
Problem: Only the first part of the search criteria is used in my app.
The filter is only working for the period 01.01.2013 – 22.08.2013.
Any ideas why this solution does not work?
If I change the input to (>=01.01.2012<=22.08.2012) or (>=01.01.2013<=22.08.2013) then
the search is only possible for the period 2012.
Thank you very much
Robert
Try:
='(>=' &YearStart(Today())& ' and <='& date(Today()) & '| >=' &YearStart(Today(),-1)& ' and <='& AddMonths(Today(),-12) &')'
try removing the braces, like
>=01.01.2012<=22.08.2012 or >=01.01.2013<=22.08.2013
Hi,
without braces no search is possible.
Even if I type in this directly into a listbox.
I think the braces are necessary.
try to put this string directly in the search string (without '='). it should work if the date format is similar.
>=01.01.2012<=22.08.2012 or >=01.01.2013<=22.08.2013
OK - if I put this string in a listbox then it works.
But how can I achieve now a button to to this? Because here I need a '='.
I have tried now to create my search string in the script.
Result is the same as I do it in the text box under action. Only year 2013 selection is available
try:
='>=' &YearStart(Today())& '<='& date(Today()) &
'or' &
'>=' &YearStart(Today(),-1)& '<='& AddMonths(Today(),-12)
Unfortunatly still only 2013 period selected.
2012 will be ignored..
Could you please share the sample app?
See attached. Thank you so far.
Try:
='(>=' &YearStart(Today())& ' and <='& date(Today()) & '| >=' &YearStart(Today(),-1)& ' and <='& AddMonths(Today(),-12) &')'