cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
flavioPBadmin
Helper I
Helper I

Update all items in a SharePoint column

Update all items in a SharePoint column

 

Hi everyone!

I have been trying to update items on a SharePoint column with no success. My aim is to have a Flow everyday that updates all column items with today's date.

 
Screenshot 2022-03-04 16.55.56.png

My current flow

 

Any idea of what what might be going wrong? The flow runs, but noting happens to the list.

Is it the 'Description' ? Should I be using another property to update the items? Which property would I be updating to fill all cells in a column?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @flavioPBadmin 

 

What you need is Get Items action step before the HTTP call and map the identifier in your HTTP action step. Flow will automatically insert a loop for the iteration. Hope it make sense.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

10 REPLIES 10
abm
Super User
Super User

Hi @flavioPBadmin 

 

Are there any specific reason you need use the HTTP action step? Why not use update item SharePoint action step which will be much easier.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
Pstork1
Dual Super User
Dual Super User

I believe the problem is that you are updating the Description of the field (column) not the record values stored in the column.  You need to update the values in /items, not /fields.  Take a look at this walkthrough.

Update single SharePoint column in Power Automate with HTTP request (tomriha.com)



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

@abmActually, for the reasons enumerated in the article that shared @Pstork1. Also, I have add success with this method and lots of problems (as in flow updating fields they should not have) with that method, so I am sticking with what as worked for me.

https://tomriha.com/update-single-date-and-time-sharepoint-column-with-power-automate/

Actually this is exactly what I wanted, but I'm getting a "Input string was not in a correct format."

My input string, I think is:

_api/web/lists/getbytitle('TeamsUsage_2022-01-03_2022-04-02')/items('TodayDate')/validateUpdateListItem

 

TodayDate is the internal name of the column and TeamsUsage_2022-01-03_2022-04-02 is the name of the list, so I am at a loss how to format it correctly.

Sorry, totally a newbie.

Can you show what format you are using in the FormatDateTime().  It needs to be an ISO8601 format.  I would suggest using the standard format of 'u' with is ISO 8601 standard sortable.  That is I believe what SharePoint is expecting.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi @flavioPBadmin 

 

Form that article it shows how to update. See below item(1) is the item identifier of the record.  In your case you are passing a string value which is wrong. You need to get the record id.

 

image.png

 

 

 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Hi @flavioPBadmin 

 

What you need is Get Items action step before the HTTP call and map the identifier in your HTTP action step. Flow will automatically insert a loop for the iteration. Hope it make sense.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

I am using the formula utcNow('dd/MM/yyyy'), as suggested in the above, which is outputting the correct number.

 

The full error is here:

{
  "status": 400,
  "message": "Input string was not in a correct format.\r\nclientRequestId: f3434a61-2c96-4d48-b392-888536ca74c2\r\nserviceRequestId: 450a33a0-908c-4000-0aec-dd06153bd00c",
  "source": "https://purplebeardltd.sharepoint.com/sites/TestingGrounds/_api/web/lists/getbytitle('TeamsUsage_2022-01-03_2022-04-02')/items('TodayDate')/validateUpdateListItem",
  "errors": [
    "-1",
    "Microsoft.SharePoint.Client.InvalidClientQueryException"
  ]
}{
  "status": 400,
  "message": "Input string was not in a correct format.\r\nclientRequestId: f3434a61-2c96-4d48-b392-888536ca74c2\r\nserviceRequestId: 450a33a0-908c-4000-0aec-dd06153bd00c",
  "source": "xxx/_api/web/lists/getbytitle('TeamsUsage_2022-01-03_2022-04-02')/items('TodayDate')/validateUpdateListItem",
  "errors": [
    "-1",
    "Microsoft.SharePoint.Client.InvalidClientQueryException"
  ]
}

 

The syntax is

 

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

 

In your case you have 

items('TodayDate')

 

This must be the id of the record which you are trying to update.

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

EUREKA!

That is it. I was under the impression that I could just put the column name in the input string.

Thank you very much!

Hi @flavioPBadmin 

 

If your problem has solved, please go ahead and mark the post as solved by clicking “Accept as Solution” so that this thread will be marked for other users to easily identify!

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,076)