
substringof('30', MMHubEmployeeGroup)
or substringof('31', MMHubEmployeeGroup)
or substringof('32', MMHubEmployeeGroup)
or substringof('33', MMHubEmployeeGroup)
or substringof('34', MMHubEmployeeGroup)
or substringof('35', MMHubEmployeeGroup)
MMHubEmployeeGroup is a text column that contains the group number, you can use a range filter instead of multiple substringof calls:MMHubEmployeeGroup ge '30' and MMHubEmployeeGroup le '35'
NOTE: ge = greater than or equal and le = less than or equal. This returns all employees where the group number is between 30 and 35.
MMHubEmployeeGroup) contains mixed text (alphanumeric) like "Group 30", "Group 31", etc., then you do need substringof. Here, you can still simplify:substringof('3', MMHubEmployeeGroup) and
(MMHubEmployeeGroup ge '30' and MMHubEmployeeGroup le '35')
(MMHubEmployeeGroup eq '30' or
MMHubEmployeeGroup eq '31' or
MMHubEmployeeGroup eq '32' or
MMHubEmployeeGroup eq '33' or
MMHubEmployeeGroup eq '34' or
MMHubEmployeeGroup eq '35')
GroupNumber ge 30 and GroupNumber le 35
A. Get items from Employee list → Filter query:
MMHubEmployeeGroup ge '30' and MMHubEmployeeGroup le '35'
GroupNumber ge 30 and GroupNumber le 35
Compose or Union action to merge both arrays if you want a single output.Compose /Union action results from above.MMHubEmployeeGroup ge 30 and MMHubEmployeeGroup le 35
{
"method": "PATCH",
"url": "/sites/contoso/_api/web/lists/getbytitle('Employee')/items(@{item()?['ID']})",
"headers": {
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
},
"body": {
"SitesToFollow": "IntranetSiteA"
}
}
4. Compose Batch Request - Wrap the array of requests in a single JSON object(in a compose action):
{
"requests": @{outputs('Select')} // Output of Select
}
5. Send HTTP Request to SharePoint - Use the Send an HTTP request to SharePoint action.
POST6. Handle Response - Parse the response to confirm which updates succeeded or failed. Optionally log errors to a separate list.
Here’s what the final payload looks like when updating multiple employees (you see it when flow runs successfully):
{
"requests": [
{
"method": "PATCH",
"url": "/sites/contoso/_api/web/lists/getbytitle('Employee')/items(1)",
"headers": {
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
},
"body": {
"SitesToFollow": "IntranetSiteA"
}
},
{
"method": "PATCH",
"url": "/sites/contoso/_api/web/lists/getbytitle('Employee')/items(2)",
"headers": {
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
},
"body": {
"SitesToFollow": "IntranetSiteA"
}
}
]
}
Benefits
SitesToFollow value per group by building different batch requests.