Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am having a problem with defining what can be displayed in a pair of multi boxes.
What I have is a set of data from multiple different periods that are all imported into one table. This table is then duplicated and joined via Account ID allowing me to compare the data of account from different periods. I then have two multi boxes, one for the From period which contains the Year and Month fields from the first table, and one for the To period containing the Year and Month fields from the duplicate table.
What the users want is to limit the available selections in one multi box based on what is selected in the other multi box so that people cannot select invalid values.
eg. If the user selects 2009 in the From period, they should only be able to select 2009 or later in the To period. If a user selects 2009 in the To period then they should only be able to select 2009 or earlier in the From period. Then we can get more complicated so if a user selects 2009 for the year and Jan for the month in the To period then they should only be able to select 2008 or earlier for the From period.
I thought I would be able to do this by doing IF(FROM_YEAR <= NUM(GetFieldSelections(TO_YEAR)) OR GetSelectedCount(TO_YEAR) = 0, FROM_YEAR) . I chose to try GetFieldSelections() because the help contents say that it should return a string rather than a set of selections, so it should be the same as doing FROM_YEAR <= '2010'. The same for GetSelectedCount() as it is supposed to return a number. This doesn't seem to be the case though as when I select a year in the From box the TO_YEAR also gets selected.
eg. If I select 2009 in the From multi box, 2009 and 2010 are selected in the TO_YEAR, then if I select 2010 in the To multi box, FROM_YEAR changes to all years selected. The patterns are different as well when you select an upper or lower end of the available values.
If anyone has any suggestions on how to make this work it would be greatly appreciated. I have attached a QVW file which demonstrates the issue. Thanks.
Sorry to bump. Right now I have just used a conditional statement on the tables and charts applicable so that they will not show anything if the From and To filters are not selected properly, but users do not want this. Thanks.