I have a flow in which I would like to clear all values from the "Person or group" field in SharePoint list. Is there any way to pass an empty string in the "Update item" activity to this field?
Solved! Go to Solution.
That can be different for each list. Check this link to get your type:
Feeling close! lol
got this error now:
Invalid JSON. Unexpected end of input reached while processing a JSON string value.
clientRequestId: 25e0b2cf-a87a-4556-a800-943a5c76a752
serviceRequestId: dcd4bb9e-b019-8000-15db-ce7f5adface0
I found the type and update it from the reference you gave me.
Just to be sure:
Method= POST
Uri= /_api/web/lists/GetByTitle('MyListName')/items(ID)
Headers
Content-Type application/json;odata=verbose
Accept application/json;odata=verbose
IF-MATCH *
X-HTTP-Method MERGE
Body
{'_metadata':{'type':'SP.Data.MySiteReferenceType'},
'MyColumnStringId':",
'MyColumnId':-1}
is it correct?
Note: My column and site name have no spaces to avoid having to use the _x0020_
It's hard to say without seeing your actual code. I would use full urls, and double check the internal names of the fields. I don't remember what flow I had this working in, but I'll try to find it.
I found a working example. This is doing 3 fields at the same time:
Hello @Anonymous
I hope you´re having a great start of the week!
I was thinking I might be having issues with some of the puntuations since my keyboard is not in english...
Do you mind copying and pasing your code from the last example please?
Please also include the Text Mode of the Headers section
Thanks a lot!
@Anonymous
It´s working beautifully!
Turns out I was missing an extra "_" on {__metadata":{...
Thanks a lot for your help!
Here´s the working code:
Right on man, I just got in to work, so you beat me to it. Cheers from Colorado!
What have i done wrong?
For the love of money, what have i done wrong.
{'__metadata':{'type':'SP.Data.Bespoke_x0020_Review_x0020_Task_x0020_ListListItem'}, 'TAG_x0020_MEStringId':'', 'TAG_x0020_MEId':-1}
Maybe try double quotes " instead of singles ' ?
Are you getting an error?
Many!
ive got it to "the property 'TAG_x0020_MEStringId' does not exist on type 'SP.Data.Bespoke_x0020_Review_x0020_Task_x0020_ListListItem'. Make sure to only use property names that are defined by the type.
clientRequestId: b3a2402e-1c62-4172-a15a-8f977b664218
serviceRequestId: 0605c79e-a046-8000-1392-77275d777b2d"
{"__metadata":{"type":"SP.Data.Bespoke_x0020_Review_x0020_Task_x0020_ListListItem"}, "TAG_x0020_MEStringId":", "TAG_x0020_MEId":-1}
Hi @Anonymous can you please post the url of your list configuration page and the url of the column that you wanna clear?
Something with names are wrong, can be the name of column(TAG_x0020_MEId) or name of list(Bespoke_x0020_Review_x0020_Task_x0020_)
Best Regards
Gustavo Moraes, o astronauta brasileiro do Flow!
<d:TAG_x0020_ME_x0021_Id m:null="true"
<category term="SP.Data.Bespoke_x0020_Review_x0020_Task_x0020_ListListItem"
at the risk of answering my own question
{"__metadata":{"type":"SP.Data.Bespoke_x0020_Review_x0020_Task_x0020_ListListItem"}, "TAG_x0020_ME_x0021_StringId":"", "TAG_x0020_ME_x0021_Id":""}
ERRORS WITH
An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected. clientRequestId: e0689a22-ea42-4c8a-a8b5-d214554a488d serviceRequestId: d307c79e-903c-8000-9209-bc9bf5c0930a
Hello!
Try this:
Method= POST
Uri= /_api/web/lists/GetByTitle('MyListName')/items(ID)
Headers
Content-Type application/json;odata=verbose
Accept application/json;odata=verbose
IF-MATCH *
X-HTTP-Method MERGE
Body
{"__metadata":{"type":"SP.Data._YouSiteReferenceTypeHere_"},
"_Name of your column here_": null
}
{"__metadata":{"type":"SP.Data.Bespoke_x0020_Review_x0020_Task_x0020_ListListItem"}, "TAG_x0020_ME_x0021_": null }
FAILED WITH
A node of type 'PrimitiveValue' was read from the JSON reader when trying to read the contents of an entity set reference navigation link; however, a 'StartObject' or 'StartArray' node was expected.
i MAY CRY.
Looks like the column name you have might not be the correct one...
It usually wouldn´t end with _
if you may attach a screenshot of your list column setting the columnt from A-Z as example using Chrome.
Example:
The correct name goes between (=, &) =Column_x0020_Name&
column name was fine, Json query was fine,
Field in Sharepoint was set up to allow multiple persons.....
Set to single only code works perfectly,
IS there a way to make it work for more than one person?
Of course there is, dont be an idiot, you can extrapolate a working string to an array....
I swear im good at this usually!
Stuggling with this as well. Here is what I have gleened so far. First issue is the command 'PowerAppsbutton-2'.Run(ThisItem.ID) has an error about needing 2 arguments, only 1 supplied. The name of the Person or Group field in Hardware list is Owner and I don't see that I reference that anywhere in the image. Also I could not get the Sharepoing ID dynamic content, only thing available is SendanHTTPrequesttoSharePoint_Uri
Ok, I think it's sorted. The issue with the PowerAppsbutton-2'.Run(ThisItem.ID) call is that in the Flow I have two SendanHTTPrequesttoSharePoint_Uri "Dynamic Contents". I have seen this issue before and have no idea how to remove the unneeded ones so I have to rebuild my flow from scratch. I also figured out the Body contents, (OwnerId).
User | Count |
---|---|
16 | |
16 | |
14 | |
9 | |
8 |
User | Count |
---|---|
28 | |
26 | |
24 | |
23 | |
14 |