Flow "Update Item" action - "Item" Parameter

GDS_User01 41 Reputation points
2020-12-30T14:17:45.19+00:00

https://learn.microsoft.com/en-us/connectors/sharepointonline/

The link above is to documentation of the "Update Item" action in Flow. (Search for "Update Item". In this documentation for the Flow "Update Item" action, there is a parameter called "Item". The ambiguity of this nomenclature makes it impossible to understand what is expected for this, so clarification is needed.

The parameters are:
Site Name, List Name, ID, and Item.

Site, List, and ID are self explanatory, but what is expected of the Item parameter? The vague description of "Item with changed properties" does not help. Doesn't the ID parameter specify the item to be changed?

----

Background:

  1. Child Lists: There exists several SharePoint lists for data entry of values, based on different parameters, but, most importantly, each of these lists has a [Status] column. (It a lookup to a list of possible statuses.)
  2. There exist a Control list, that when the Status of a Control Item is changed, each related Child list item must be updated to that same Status. (Based on Company and FY. These child lists cannot be combined into a single list for many reasons.)
  3. There exists of List of lists, that defines which child lists must be updated when the Control list item is updated, based on the Company. (Not all companies enter data in all child lists, so this allows for skipping an update to any child lists that don't apply.)

So, the flow works like:
a. After control item is updated, lookup to List of Lists to retrieve the child lists to be updated. "ResultsA"
b. Loop through "ResultsA", thus stepping into each needed child list, and find any items that match [Company] and [FY]. "ResultsB"
c. Loop through "ResultsB", and update the [Status] column to the [Status] value selected in the control list, from Step a.

It is step c where [List] & [ID] are easily provided via variable, but then the [Item] parameter is still required, but it does not make sense as to what is expected to be provided.

TIA

Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

Accepted answer
  1. Ben Rolph 81 Reputation points
    2021-01-08T16:33:53.51+00:00

    It's expecting a JSON object of the Item properties. For example:

    {
    "Title": "test",
    "Department": "testing"
    }

    This would update the Title column with 'test', and the Department column with 'testing'.

    I'm still trying to figure out the expected schema for other column types like Person fields.

    Hope this helps!

    0 comments No comments

8 additional answers

Sort by: Most helpful
  1. GDS_User01 41 Reputation points
    2021-01-11T12:49:58.92+00:00

    Thanks, but the question is How did you come to know that the Item parameter was expected a JSON input? Where is that documentation?

    0 comments No comments

  2. Ben Rolph 81 Reputation points
    2021-01-11T12:53:38.943+00:00

    I'm familiar with using the REST API already, and just got the above working after some trial and error. Had tried googling for docs but couldn't find any, so there may not be any...

    0 comments No comments

  3. GDS_User01 41 Reputation points
    2021-01-11T12:57:24.34+00:00

    Ok. I'm very familiar with REST, but would never have thought to try that. Great job.
    (25 years of Microsoft experience, and this was just baffling.)

    0 comments No comments

  4. Ben Rolph 81 Reputation points
    2021-01-11T13:02:59.89+00:00

    Thanks! Microsoft don't always make it easy.

    If you're familiar with REST, the 'Send an HTTP request to SharePoint' action in flow may be easier to use than the out the box update item action when dealing with dynamic site urls and lists/libraries. It handles the auth for you by signing in to the connector, and is plenty documented on the link I posted above.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.