Adding people to a group with enumlist

I have an app with about 180 users and they all have different groups associations. Sometimes a user will have 2 groups and sometimes a user will have 5 groups. The groups are stored in individual fields such as [Group1], [Group2], [Group3], [Group4], [Group5] up to [Group8]. When a person wants to make a new group they create the group in another table and and then go to the users and add them to the first available group under each users. Is there a way to automatically add a group to a user when they create the group, select the user on an enumlist and it will add the user to the first available group field?

It would be like this:

1. Create new group

2. While created the group select users on enumlist

3. Program adds the user to the group as long as the field is blank, sometimes they would be added under field [Group2] and sometimes they would be added under field [Group5], whicever field is blank first.

0 2 135
2 REPLIES 2

I'll paraphrase...a user can create up to 8 User groups.  This user would go to the Groups table, add a new Group and select the users that belong to this group.  You are now searching for a way to automatically insert this Group reference into the first available slot in the columns of [Group1] - [Group8].  Do I have the correct?

There is an easier way.  Add a Ref column, maybe named "Owner", to your Groups table that specifies which user the new Group row belongs to.  Populate this "Owner" column with the current user reference at the time the Group is created.

You will automatically get a [Related Groups] virtual column in your User table AND a user will not be limited to only 8 groups.  They can have as many as they wish - though you could limit it to 8 if your app requires it.

 

 

Your paraphrase was correct except there can be as many groups as people want to create but a user can only be part of 8 groups.  I thought about going the other way with a ref but the problem is they way I am sending notification. I have the program look at the groups of the users and if their group (group 1- group ๐Ÿ˜Ž is one of the groups listed in notify(groups). I had problems with doing groups to groups in the past so I try to avoid that.

Top Labels in this Space