4 Replies Latest reply: Jun 26, 2013 7:20 AM by Andrea Monico RSS

    Group items usign expression in ListBoxes

    Andrea Monico

      Hi,

       

      I am having the problem shown in the example that I attach.


      Basically, I have to give the user the possibility to select the activities (Activity1.A, Activity1.B, etc) that a given company (Company1) performs. Each single acitivity belongs to an activity group (Group1, Group2).

       

      The solution that the client would like to have is Solution1 in the example: a single listbox where the values are already divided by group.
      I used an expression to choose the elements that should go in certain listbox: =If(Group='Group1', Activity).


      I am facing two problems now:

       

      1. Compared to the standard Solution2 when I select an item linked to group 1 (e.g. Activity1.A from the listbox "Activity Group 1") then I am not allowed to select an element from "Activity Group 2" without losing the selection in "Activity Group 1". In Solution2 I can select items linked to different group.

       

      2. In Solution1 I would like the underlying group selection to be completely transparent to the user. With that in mind I implemented Solution3 where the group column is now called %GroupHidden and HidePrefix is set to %. But, if a user selects an activity in one of the two listboxes in solutions 3 (e.g. Activity1.A in "Activity Group Hidden 1") and then clears the selection from the Current Selection Box the underlying group activity (%GroupHidden) is still selected and the activities in "Activity Group Hidden 2" are still greyed out.

       

      Is there any neat and clear solutions to group values coming from the same table field in different listboxes?
      PS: I know I could build n different Activity (ActivityGroup1, ActivityGroup2, etc.) tables  and link them to a main "Company" table, but I am wondering if there is any other alternative way.

       

      Thank you