Data Scope Issue in Add/Edit Group Form - Displaying Only Unassigned Teams

Hi NocoBase Team,

I’m experiencing an issue with the data scope feature in the add/edit form of the “Groups” collection. I need to filter the available “Teams” so that only those teams that are not yet assigned to any group are displayed. However, I’m unable to configure the data scope to achieve this.

Collection Structure:

  1. Collections:
  • Competition
  • Teams
  • Groups
  • Teams in the competition
  • Team groups
  1. Relationships:
  • CompetitionTeams: Many-to-Many relationship through the “Teams in the competition” collection.
    • Competition/source-key = “Name En”
    • Teams in the competition/Foreign-key = “competitionIDname”
    • Teams/source-key = “Full Name (in English)”
    • Teams in the competition/Foreign-key = “TeamIDname”
  • GroupsTeams in the competition: Many-to-Many relationship through the “Team groups” collection.
    • Groups/source-key = “ID”
    • Team groups/Foreign-key = “groupid”
    • Teams in the competition/source-key = “ID”
    • Team groups/Foreign-key = “teamid”

Issue:

In the “Groups” add/edit form, I want to configure the data scope to display only those “Teams” that have not yet been assigned to any group. However, I’m not sure how to set up the criteria in the data scope configuration to accomplish this.

Request:

Could you please guide me on how to set up the data scope for this scenario? Specifically, I need help filtering the “Teams” collection to exclude any teams already assigned to a group in the “Team groups” collection.

I have attached screenshots of the collections and the current data scope configuration for reference.

Thank you for your assistance!





1 Like

Hi @assidiwassim Could you please request a demo and replicate your design within it? This would make communication easier. PS: Thank you for providing such detailed information; I understand it took quite a bit of time.

https://demo.nocobase.com/new

I hope this message finds you well.

I wanted to let you know that I can create a demo to showcase the work I’ve done. However, the demo will expire within 48 hours. Could you please confirm if this timeframe will be sufficient for you to review it?

If you need more time or prefer a more interactive approach, I’d be happy to set up a live online meeting where I can walk you through the demo and discuss any questions or issues in real-time. Please let me know what works best for you.

Looking forward to your response.

Best regards,
Wassim Assidi