cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ToniMorenoAdecc
New Member

Updating LookUp field in Sharepoint list is not working from Power Automate

Hello.

I come to you with a question that is driving me crazy.

I built a flow that needs to change the value of a lookup field in a Sharepoint list to a given value.

The flow run successfully but the field is not updated (other fields are successfully changed, it only happens with lookup).

This is the row I want to change (I keep all the sample as I could):

ToniMorenoAdecc_0-1626255489771.png

I will try to change the field "Division" with an HTTP request:

ToniMorenoAdecc_1-1626255775765.png

After running the flow, everything is OK

ToniMorenoAdecc_2-1626255890193.png

But the field remains unchanged.

 

Of course I've verified that I'm checking the right row and that I'm passing the right Id and Value.

I've also tried not providing the Value field and even to change the row with a "Update element" action in the flow, nothing worked.

 

Can someone tell me what am I doing bad??

Power Platform is supposed to be something easy to work with and not giving us such nighmares.

 

Best regards and thanks in advance.

Toni

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

@ToniMorenoAdecc , I'd try to add " " around the number, and if it doesn't help, then try this simplified request to update the item.

Uri: _api/web/lists/GetByTitle('<ListName>')/items(<ItemID>)/validateUpdateListItem

Body:
{
    "formValues":[
	{
	    "FieldName": "Division",
	    "FieldValue": "62"
	}
    ]
}

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

7 REPLIES 7
tom_riha
Super User
Super User

Hello @ToniMorenoAdecc ,

lookup fields are updated using the lookup id, try using only:

"Division": 62

 



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Hi Tom

Thanks for your help but, unfortunately, that doesn't work 😞

I changed the body as you suggested

ToniMorenoAdecc_0-1626272820937.png

 

But when running I got the following exception (error 400):

ToniMorenoAdecc_1-1626272936224.png

(sorry for posting it in spanish).

 

Just to clarify, if it wasn't clear enough, the lookup values of this column are stored in another Sharepoint list.

 

Thanks anyway for the try

 

 

Hello @ToniMorenoAdecc ,

you must use the ID of the item in the second SharePoint list, the one that's source of the lookup values.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
ToniMorenoAdecc
New Member

Yes Tom, that's exactly what I did:

ToniMorenoAdecc_1-1626338757674.png

 

ToniMorenoAdecc_2-1626338791020.png

 

 

@ToniMorenoAdecc , I'd try to add " " around the number, and if it doesn't help, then try this simplified request to update the item.

Uri: _api/web/lists/GetByTitle('<ListName>')/items(<ItemID>)/validateUpdateListItem

Body:
{
    "formValues":[
	{
	    "FieldName": "Division",
	    "FieldValue": "62"
	}
    ]
}

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
ToniMorenoAdecc
New Member

@tom_rihasolution works!

Anyway, I think it's just a workaround and the normal way to achieve it is the one I wrote first that matches with the Json that we originally get.

Hope that Microsoft fix it

Thanks.

Did you find any solution for this issue?

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,383)