Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey experts,
Retrieving date value selected from Listbox is easy , using
DATE(GetFieldSelections(DATA_DATE))
How to get the previous Max value.
I have last business day of each month in a ListBox starting Jan 31-2020 .
Here are the values :
31-Jan-2020
28-Feb-2020
31-Mar-2020
30-Apr-2020
29-May-2020
30-Jun-2020
31-Jul-2020
31-Aug-2020
30-Sep-2020
30-Oct-2020
30-Nov-2020
31-Dec-2020
29-Jan-2021
26-Feb-2021
Suppose user selects 30-Jun-2020 , I need Previous Max value 29-May-2020 in a variable.
First, you don't need that structure to get the selected value - as long as a value has been selected, you can just use =DATA_DATE. If no value has been selected this won't work, but neither will your formula (you can't date() multiple values).
Second, I believe this should get you the last date that's smaller than the selected one, providing a selection has been made:
max({<DATA_DATE= {"<$(=[DATA_DATE])"} >} DATA_DATE)
Note that this assumes your values are already valid dates, as this won't work correctly on text strings.
First, you don't need that structure to get the selected value - as long as a value has been selected, you can just use =DATA_DATE. If no value has been selected this won't work, but neither will your formula (you can't date() multiple values).
Second, I believe this should get you the last date that's smaller than the selected one, providing a selection has been made:
max({<DATA_DATE= {"<$(=[DATA_DATE])"} >} DATA_DATE)
Note that this assumes your values are already valid dates, as this won't work correctly on text strings.
Thanks , that worked!