How to exclude the AD groups/any from the teams view workspace list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2026 11:11 PM
HI Community,
Currently teams view in workspace shows all the groups the user is a member of. AD groups should be excluded from the list
How can we achieve this is that we can add filter like that?
I only want actually groups to be displayed the users are part of
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 06:09 AM - edited 01-29-2026 06:09 AM
Hi Suuriyas,
You are very close!
Technical Analysis: You are seeing the "Read-only" message in the JSON tab because you are trying to edit the filters (Array) definition, which defines the Tabs structure (e.g., Tab 0 = "Your Teams", Tab 1 = "All Teams"). This property is often hidden or protected in the component definition, which is why you cannot edit it directly in the JSON view.
The Solution: Instead of trying to hack the definition of the tabs (the filters array), you should modify the Filter (String) input field that is visible on the left side of your screen (Screenshot suuriyas_1).
This Filter field controls the actual query sent to the server. Currently, it just passes the value from the selected tab (@selectedFilterItem.filterCondition). We can change this to a Script to append your exclusion logic dynamically.
Step-by-Step Implementation:
Select the Data Resource: Click on "SOW Team management" in the Data Resources panel.
Locate the "Filter" Input: Look at the configuration panel on the left (as shown in your screenshot suuriyas_1). Find the Filter field. Currently, it shows a database icon (Data Binding).
Change to Script: Hover over the Filter field / label and look for the Code / Script (</>) icon. Click it.
Note: If you don't see the icon immediately, you might need to click the database icon first to unbind, or look for the "Edit script" option.
Paste the Logic: Replace the binding with the following script. This script takes the original query from the tab and adds your "Not AD" condition to it.
function evaluateProperty({api}) { // 1. Get the query from the currently selected tab (Your Teams / All Teams) var currentQuery = ""; if (api.state.selectedFilterItem && api.state.selectedFilterItem.filterCondition) { currentQuery = api.state.selectedFilterItem.filterCondition; } // 2. Append your exclusion condition // Since 'type' is a List field, we use 'NOT LIKE' (does not contain) // Replace 'ad_imported' with the exact value or SysID of your AD type var exclusion = "^typeNOT LIKEad_imported"; // 3. Return the combined query return currentQuery + exclusion; }
Why this works:
"Your Teams" Tab: The query becomes manager=me... ^typeNOT LIKEad_imported.
"All Teams" Tab: The query becomes (empty) ^typeNOT LIKEad_imported.
You bypass the read-only JSON definition by modifying the query right before it executes.
Important Syntax Note: Ensure the value ad_imported matches the Value (backend name) of your Group Type, not just the Label. If you are unsure, it is safer to use the SysID: ^typeNOT LIKE<sys_id_of_ad_type_record>
If this script approach solves your filtering issue, please mark it as Accepted Solution.
Best regards,
Brandão.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 07:18 AM - edited 01-29-2026 07:35 AM
HI @Itallo Brandão ,
Sorry to ask you again.
But i don't see any Code / Script (</>) icon.
so this is the filter right when i hover that it show 2 option pen symbol (use static input) and database symbol (bind data)....when i select static input it clears the condition and on selecting database symbol it pops this page
How can i unbind it and i don't see any edit script option
and if i remove this i can't able to apply it the apply button grayed out
Or can i directly use like this in filter condition
sys_idINjavascript:gs.getUser().getMyGroups()^typeNOT LIKEbb9f1513ebc95250b2bff25e1bd0cd15
I think this works but not sure will it affect any other things
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 07:37 AM
Hi Suuriyas,
No need to apologize! The UI Builder interface varies slightly between versions, and in the newer "Next Experience," the direct Script button (</>) is often replaced by Formulas.
Based on your screenshot suuriyas_1, you are in the right place. You just need to switch tabs.
Here is the workaround using the fx Formulas tab:
Open the Modal: Click the Database icon (Data Binding) on the Filter field again to open the popup shown in your screenshot.
Select the Formula Tab: In that popup, click on the fx Formulas tab (it is the second tab, right next to "Data types").
Enter the Logic:
In the formula editor, you need to combine the existing state value with your new string.
Type the following expression exactly:
JavaScriptapi.state.selectedFilterItem.filterCondition + "^typeNOT LIKEad_imported"Click Apply.
Why this works: The fx Formulas tab allows you to perform basic operations (like joining two pieces of text) without writing a full script function. It takes the dynamic value from the tab you selected (selectedFilterItem.filterCondition) and appends your exclusion rule to it.
Important: If the formula editor complains about api.state..., try double-clicking the selectedFilterItem pill from the list on the left to insert it, and then manually type + "^typeNOT LIKEad_imported" after it.
If this Formula approach allows you to save the filter, please mark it as Accepted Solution.
Best regards,
Brandão.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 08:00 AM
HI @Itallo Brandão ,
Thanks Again.
Replicate the same what you said by again im not able to edit in Fx Formula.
OPened the Fx formula table i can see all these things and i don't see any thing like state or filter
I'm using yokohama patch10 hotfix.
Instead i tried something like this is this a correct approach?
i directly use like this in filter condition
sys_idINjavascript:gs.getUser().getMyGroups()^typeNOT LIKEbb9f1513ebc95250b2bff25e1bd0cd15
I think this works but not sure will it affect any other things
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2026 10:08 AM
Hello @suuriyas,
I called my friend Igor Matheus to help us; he's an expert in UI Builder. He'll be responding here soon.
See you!

