Share functionality

I have an app which lists cases.

  • A user can create multiple teams.
  • when a user creates a team, they are added to that team as a team member. (list of users) - and the team is also added to the user field teams (List of teams).
  • When a case is created - a team is added to that case so that I can filter cases by current user’s team (stored in custom state)
  • Teams have a case-list field (list of cases) - I can add cases to different teams.

But currently 1 case can only belong to 1 team.

I want to be able to share a case with other teams. My idea was to create another field in cases - Teams (list of teams)

Am I even on the right track?

Any help or suggestions would be helpful.

Thanks

Hi there, @Rob_07… having a field on the Case data type that stores a list of teams with which each case has been shared certainly sounds reasonable to me (especially when you consider that the list, much like it sounds for all of your lists, is going to be relatively small). If you go that route, you probably wouldn’t need the field that is currently being used to associate a team with a case because when a case is created, you could simply add the appropriate team as the first team in the list field.

Anyway, just my two cents, and I hope it helps.

Best…
Mike

Thanks for your suggestion. I think I understand what you’re saying. I always get confused when working with lists of things l, but I’ll try and implement your suggestion when I wake up.

1 Like