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

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,830 questions
SharePoint Workflow
SharePoint Workflow
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Workflow: An orchestrated and repeatable pattern of business activity, enabling data transformation, service provision, and information retrieval.
602 questions
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. Allen Xu_MSFT 13,831 Reputation points
    2020-12-31T09:04:33.933+00:00

    Hi @GDS_User01 ,

    Item parameter of “Update Item” action means that the fields of an item which you can modify. You can put updated values in those fields.

    ID parameter does specify the item to be changed, you can use Dynamic content or Expression to update it dynamically instead of setting it to a static value.
    52492-image.png

    As to your last doubt, to understand your requirement better, could you share your flow details and list details(control list/child lists/lists that decide which child lists need to be updated) here?


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. GDS_User01 41 Reputation points
    2020-12-31T12:27:25.533+00:00

    You didn't read my description. I know this because you have selected a specific list, and you get specific column names from that list. I am using a "variable" from one of my results as the basis for the list to be used. As such, I don't get the specific fields as you've done. Instead, there are only: Site, ID, and Item. (Notice that your pic does NOT reflect the Item parameter at all.

    Thus, your answer does not apply to my situation. Feel free to try again using the setup that I've described.

    0 comments No comments

  3. GDS_User01 41 Reputation points
    2021-01-08T17:41:26.703+00:00

    Sounds like as good as an answer as any. Do you know where any documentation is about it?

    Thanks!

    0 comments No comments

  4. Ben Rolph 81 Reputation points
    2021-01-11T10:02:48.153+00:00

    Any documentation on the SharePoint REST API should work. I think this will be the schema it will be looking for, ignoring headers and metadata information.

    https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-rest

    I generally get better results when just googling for the SharePoint REST API syntax for whatever action I'm trying to achieve rather than sifting through MS docs! :)

    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.