Hi all,
We have created a flow with Forms and Power Automate that adds new users to a sharepoint list. The list provides access to various Power BI reports for all users stored there. The flow works like this: A team leader uses Forms to add an employee to the sharepoint list. This goes to an manager for approval and when it is approved, the user is added to the list. Everything works as we want.
Now we want to create another flow (also with Forms and PA), but we want to use it to remove a user from the same sharepoint list and thus access to the BI report. We want to use the email address and department to match with the user to be removed from the list. It should go through the same steps as the flow when we add the user. This is beyond my knowledge so I am asking for help :).
Solved! Go to Solution.
Your flow should be similar like adding new item.
item('Apply_to_each')?['ID']
Your flow should be similar like adding new item.
item('Apply_to_each')?['ID']
Hi
I'm getting this error when I try to run the flow. I'm filtering Region instead of the Department.
The field 'Region' of type 'Note' cannot be used in the query filter expression.
clientRequestId: 106c9495-8547-4502-bd30-328fdec4e428
serviceRequestId: 106c9495-8547-4502-bd30-328fdec4e428
Okay. Why do you have Region field as Note OR Multi Line Text. Can you create that as Choice?
Thank you @PrasadAthalye !
I have changed to single line and the flow runs successfully but the SharePoint line is not deleted. E-post and Region matches with the input from Forms.
Filter Array output is empty. Can you please upload output of GetItems? Does it return data?
If yes, Can you please use Compose before filter array and map it to Responders email and check the value? Then compare it with SharePoint list and see if matches correctly.
You mean this one?
"ItemInternalId":"6","ID":6,"E_x002d_post":"sany@iss.se","Aff_x00c3__x00a4_rsomr_x00c3__x0":"3","Divison":"543","Region":"57656","Distrikt":"546","Driftomr_x00c3__x00a5_de":"988798","Kostnadsst_x00c3__x00a4_lle":"8978978","Kundgrupp":"09090","Modified":"2021-05-22T15:02:58Z","Created":"2021-05-22T14:53:33Z"
Okay. Can you use compose and map it to Responders email and upload the output?
Sorry. I can not see the output. But does it exactly matches the email address that you are filtering? (sany@iss.se)
It appears to me like longer than the email address in the bracket... If its an array, you will have to split it and then compare.
Ok thank you. Email from logged in user is .com as seen above sany@iss.com and email from SharePoint is sany@iss.se.
So they have different domains so its not matching. You will have to update SharePoint to reflect .com.
Sorry, missed that completely . I have changed to the correct email in Sharepoint and now there is an output in filter array. Next problem 🙂 is that Set variable is failing.
Unable to process template language expressions in action 'Set_variable' inputs at line '1' and column '34578': 'The template language function 'item' must not have any parameters.'.
Your expression of Set variable is incorrect. It should be items with s. refer example below.
items('Apply_to_each_7')?['ID']
User | Count |
---|---|
92 | |
44 | |
21 | |
19 | |
17 |
User | Count |
---|---|
144 | |
51 | |
42 | |
40 | |
31 |