Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have a list box containing all the months in a year. The month field forms a relation between my current year transaction table and a time periods table. Currently we have transactions corresponding only to the last two months i.e, Oct and Nov. So when I use section access, only Oct and Nov are displayed in the list box. If I do not apply Section Access, same application shows me all the months even though there are no transactions for those months. Can any one help me with this?
I am able to do section access correctly. I get only that particular listbox reduced.
Hi,
I'm not sure what you want do with this but you can try load your datefield twice in your TransactionTable (this is only to keep data as smal as possible, so cou can skip this step)
TransactionTable:
load*,
%Datekeyfield as %DateKeyTmp
From XY;
Then resident load your reduction field (which is linked to section access) from ta table
Tmp:
Load distinct
YourReductionField
Resident TransactionTable;
Then create the carthesian product of Missing Datekeyfield Values and your Reduction Field values:
join (Tmp)
load distinct
monthstart(%Datekeyfield) as %Datekeyfield
Resident YourCalendar where %Datekeyfield >= makedate(year(today()),1,1) and %Datekeyfield <= makedate(year(today()),12,31) and not exists (%DateKeyTmp, %Datekeyfield);
and concatenate it finally to your TA table
concatenate (TransactionTable)
load*
Resident Tmp;
drop table Tmp;
This should allow you to show all month in listbox even with initial data reduction
hope this helps
Best
Stefan