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

6 REPLIES 6
tom_riha
Super User II
Super User II

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. ]

View solution in original post

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.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,225)