AnsweredAssumed Answered

Trying to filter down information twice, then insert ID numbers into a separate field.

Question asked by MikeWood on Jun 1, 2017
Latest reply on Jun 1, 2017 by philmodjunk

Need some help wrapping my head about the best way to create a solution for this:


I have 9 blue lighting fixtures on three different positions:


Position 1) Light IDs 1,2,3

Position 2) Light IDs 4,5,6

Position 3) Light IDs 7,8,9


I'm creating "group" records of these lights in a separate table where a user can select two filters to create multiple groups. So for instance, Filter 1 would be something like "Color=Blue" which narrows down 100+ lighting fixtures into the 9 in my above example.


Then, they should be able to select a Filter2 to narrow them down further. "Position" for instance, which would then break them up into the three groups that I listed above.


Easy enough to just display this information in a portal, that's not the problem. Problem is that I need to gather the ID numbers of each light and put them into a "contents" text field in the "groups" table so that they can be sent to another program as individual group records.


For an overall group (let's say Lights 1 through 9) I do this easily by looping through the found fixtures (using filter 1,) grabbing their IDs, and then inserting into my "contents" field separated by commas. That's working properly and isn't a problem.


The confusion for me comes in when I'm trying to create the further refined groups using both of my filters.


The above example needs to be able to create the following records in my "Groups" table.

Group 1 would be IDs 1-9 (Can do this already)

Group 1.1 would be IDs 1-3

Group 1.2 would be IDs 4-6

Group 1.3 would be IDs 7-9


Any ideas?