I have been working on this 'simple' task for a few days and I'm finally asking for some help.
I'm looking to have a form sent to a colleague for approval then having the data submitter having their name removed from a list once approved.
I was using this link for rough guidance but I cant get the name to be removed from the list after approval.
My test List for removal is called 'TBD Follow Up2':
|ID||Data Provider Name|
Strangely on the form I have named the Data Provider column "Stuart" please ignore this. I just want to get a trial up and running.
Basically once Jane's submission has been approved she can be deleted from the List.
However my flow fails:
Any help would be great.
@Stuart3 what is the data type of Data Provider column in your SharePoint list, is it single line of text, if yes then you can directly apply query in Get Items using Filter query e.g. ColumnName eq 'value', so that you will not need filter array action. The error that you are facing is in Set Variable action, what expression are you using in the value parameter of Set Variable action, can you please provide the expression?
@Stuart3 okay to avoid an extra step you can directly use filter query in Get Items instead of using Filter Array, you could do that.
The expression seems to have typo in item, it should be items('Apply_to_each')?['Data Provider Name']
In my example what should the filter query look like?
I basically want to remove the name from the approved form from the Sharepoint list. The form column is called "Stuart" and the corresponding List column is "Data Provider".
@Stuart3 in order to use filter query, first you need to get internal name of column "Data Provider" in list, so go to your SharePoint List settings, you will see the Data Provider column there, click on that column. Now look at URL in the browser, you will see ?Field=, whatever name is where after ?Field= take that column name. E.g. if url is http://test.sharepoint.com/sites/test/_layouts/15/FldEditEx.aspx?List=%7BA4E78CC7-F74F-4733-832A-099... then here FirstName is my column internal name.
Now take the internal name e.g. FirstName, provide filter query as FirstName eq '<here select value from dynamic content of idtodelete>'
@Stuart3 you need to provide the Id in Delete Item action, from Get Items dynamic content, use below expression to get the Id value
I've simplified my flow to get it running.
As there will only ever be one provider request and one approval I presume For Each loop is not needed.
I've put into your Suggestion below (highlighted) but it just deletes the first ID from each List. What I need is when variable "Stuart" from the Form submission equals "DataProvider" to be deleted only. i.e. Jane is accepted and then she's removed from the list.
Does this make sense?
@Stuart3 okay in that case your Get Items filter does not seem to work, can you please expand the get item action in your flow and provide the screenshot of it, so that i can see the Filter Query
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.