Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello I have the following question.
I have a listbox were i select a month in a certain year, i.e.
Month: 1 2 3 4 5.. etc.
My datamodel is made in a way that it requires the user to select all the months to see the balance at the end of that month. So to see the balance at the end of march, he has to select:
Month: 1 2 3 4 5 6.. etc
Is there a way that upon selecting just march, the first 2 months will be automaticly selected?
Hi Willem,
you might also create a selector table, which contains a selector field (e.g. MonthSelector) that links to all months less or equal the MonthSelector value.
regards
Marco
tabData:
LOAD
Ceil(RecNo()/10) as Month,
Round(Rand()*100) as Data
AutoGenerate 120;
tabTemp:
LOAD Month as MonthSelector Resident tabData;
Join
LOAD Month Resident tabData;
NoConcatenate
tabMonthSelector:
LOAD
Month,
MonthSelector
Resident tabTemp
Where Month <= MonthSelector;
DROP Table tabTemp;
Don't know if that is possible or not but as an alternate solution..
you can create a button named Select Month and add an action
Select In Field
Field
Month
Search String
='<=$(=Max(Month))
Now once you select any Month and click on that button.
It will select all previous + your selected months.
Hope this helps.
Thank you for your reply.
That would be possible, but I am really looking for a way to skip this extra step. I was hoping there was an easy solution for this.
I did something similar to Manish's reply. I created an input box which would select all the numbers less than and equal to the input value. If user inputs 5 then 1 to 5 would be selected in the list box.
Another suggestion: You can use set analysis in this balance calculation such that it will include all months <= selected month instead of selecting all months in the list box.
Thanks
AJ
instead of a button add a document trigger (field event trigger) on field Month
On Select --> Select in Field
Field Month
Search String ='<=$(=Max(Month))'
the user will select a month and all previous month (and selected too) will be selected
hope it helps
Hi Willem,
you might also create a selector table, which contains a selector field (e.g. MonthSelector) that links to all months less or equal the MonthSelector value.
regards
Marco
tabData:
LOAD
Ceil(RecNo()/10) as Month,
Round(Rand()*100) as Data
AutoGenerate 120;
tabTemp:
LOAD Month as MonthSelector Resident tabData;
Join
LOAD Month Resident tabData;
NoConcatenate
tabMonthSelector:
LOAD
Month,
MonthSelector
Resident tabTemp
Where Month <= MonthSelector;
DROP Table tabTemp;
works perfect! thanks!