Hi all.
I have build several approval flows on document libraries, but have the problem that, the documents can be locked for updating it they are opened when the flow wants to update the metadata.
I have read an article about using the http request for SharePoint, and have been trying to use this, but with no luck. I am very new to this, and a no code guy, so I hope you forgive me if it turns out to be a newbee error.
The flow runs perfect until, the http request. I want to update two SharePoint fields, that gets data from to variables.
As I can see it is in the body I get something wrong. i have read this articel, but still cannot get it to work:
Working with lists and list items with REST
When the flow has been running I get the data I want in the body, but are not able to get it to update the SharePoint fields. I would be very happy for any kind of advice to solve this problem.
/Frank
Denmark
Solved! Go to Solution.
Hi again,
This is going to sound simple, but you have a leading space next to SP.Data.DocumentsItem. I created my own test and tried it out to see if a leading whitespace would really throw that error, and I was able to replicate that issue. Try removing the whitespace and run the Flow again!
Here is my successful HTTP PATCH action:
Hi @venseben ,
Could you please share more details about the error message when the flow runs?
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @venseben,
Can you screenshot the error message that you get from the HTTP action? I'm also assuming the Response variable you have comes from a previous approval step. What data type is the "Status" column? If Status is a choice column you may have issues there.
Thanks!
Ashley
Hi @v-alzhan-msft and @AKRogers Thx for quick replys. I will try to provide you with some screenshots and further details: It is a standad approval flow for a selected item in a SharePoint library.
When i check out the history of the flow, the outcome is matching the condition, and the flow is going in the right direction, but failes, with this error message:
A type named ' SP.Data.Documents' could not be resolved by the model. When a model is available, each type name must resolve to a valid type.
The "Status" field in the SharePoint library is a text field, and the "Godkendt" field is a date field.
Hope this can make any snece to you 🙂
/Frank
Denmark
Hi @AKRogers. The library is named "Documents", it is a new library, and not the standard shared%20documents library, so the name shoud be correct. I have just done a test with the Get method that you mentioned, an the flow was running just fine. I did get a list guid in return, so i will try that and see how the flow turns out. I also got the type back and it is "SP.Data.DocumentsItem", so maybe that is also the root cause. I will do some testing and return back to you.
THX a 1000 times for the tip with trying the Get method.
/Frank
Hi @AKRogers. Still get the error
I have tried to insert the guid, but that did not helped, and I have tried to insert the type, and taht did not help either
I still get the same error that there is something with the model. See the error status below.
/Frank
Denmaerk
Hi again,
This is going to sound simple, but you have a leading space next to SP.Data.DocumentsItem. I created my own test and tried it out to see if a leading whitespace would really throw that error, and I was able to replicate that issue. Try removing the whitespace and run the Flow again!
Here is my successful HTTP PATCH action:
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
8 | |
5 | |
4 | |
3 | |
3 |