Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Exactly as the question above states. For more information, the values in the list box are years and the purpose is to do a calculation between two years so I always need exactly two years selected in the listbox.
In the toy app I sent, replace the hard coding with something like;
data_dates_temp:
Load distinct
Date as D1
Resident data_date;
join (data_dates_temp)
Load
D1 AS D2
Resident data_dates_temp;
load
D2&'/'&Right(D1,2) AS Dates,
D2 AS Date
Resident data_dates_temp
Where D1>D2;
load
D1&'/'&Right(D2,2) AS Dates,
D2 AS Date
Resident data_dates_temp
Where D2>D1;
DROP Table data_dates_temp;
Hi,
If you can change the data model then possibly you could try adding a new table/field that gives combinations of the years that then links through to the dates, you could then use 'Always One Selected Value' on that field, something like the below;
Otherwise I think you might have to try to do something on the field event triggers possibly involving using macros ... which I think would be clunky.
Cheers,
Chris.
Could you link your qvw on how to do that? Thank you.
I've been very lazy and hard coded the date pairs. You could do it dynamically, would depend how many date pairs you have & if you would want them to change (without going & adding in).
How would it be done dynamically?
In the toy app I sent, replace the hard coding with something like;
data_dates_temp:
Load distinct
Date as D1
Resident data_date;
join (data_dates_temp)
Load
D1 AS D2
Resident data_dates_temp;
load
D2&'/'&Right(D1,2) AS Dates,
D2 AS Date
Resident data_dates_temp
Where D1>D2;
load
D1&'/'&Right(D2,2) AS Dates,
D2 AS Date
Resident data_dates_temp
Where D2>D1;
DROP Table data_dates_temp;