Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

SharePoint "Update Item" step fails (when the same type of step to working in another flow)

(0) ShareShare
ReportReport
Posted on by 8

I have successfully created a flow that works basically like the following.

  • When an item is created (in a SharePoint list)
  • Get User Profile
  • Update Item (in the same SharePoint List)
  • Get Manager
  • Send an Email
  • Post Message (to Yammer)

I am working on a second flow that will follow a similar pattern but in the second flow the Update Item step is failing with this error:

Unable to process template language expressions in action 'Update_item' inputs at line '1' and column '2116': 'The template language expression 'body('Get_user_profile')?['OfficeLocation']' cannot be evaluated because property 'OfficeLocation' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

 

What I am trying to do is update a column on the SharePoint list that is a single line of text called Location.  I want to pull the Office Location from the User Profile then inset this data into the locations column for the new item that was just created.  Would anyone know why this "update list" step would work with one flow but not with another?  Both lists are on the same Office 365 site.  From what I can tell both flows are set up exactly the same way.  Why would one flow succeed only to have a second flow fail at this step? 

  • GrantCocco Profile Picture
    8 on at
    Re: SharePoint "Update Item" step fails (when the same type of step to working in another

    Hi @v-micsh-msft

     

    Note: I did create a new test flow replacing the Get User Profile action with the Azure AD Get User action as you suggested. Thank you for that tip.  At first I tried the new flow against the the problematic list.  The new flow failed to update the location field just as before.  I simply pointed the flow to another list to notice this unmodified flow succeeded.  

     

    It appears the core issue was never really with Flow but rather with the target list.

    (see details, in a seperate response to this post, regarding Rating option turned on for a SharePoint list.

     

        

  • GrantCocco Profile Picture
    8 on at
    Re: SharePoint "Update Item" step fails (when the same type of step to working in another

    Hello @v-micsh-msft

    I may know what is contributing to this issue. I realized that we had turned on "Rating" for the problematic list.   This afternoon I created a new SharePoint list with three basic columns to duplicate the data we were gathing before.   The flow ran successfuly.   I added more columns and again had successful tests.   However as soon as I enabled the option for rating the flow failed and continues to fail despite disabling the ratings option.  

  • GrantCocco Profile Picture
    8 on at
    Re: SharePoint "Update Item" step fails (when the same type of step to working in another

    Hi Michael

     

    I created a seperate "Test" flow to see if I could narrow down the issue.  In this new flow I have cut down the number of steps to three.  

    • When an item is created (in a SharePoint list)
    • Get User Profile
    • Update Item (in the same SharePoint List)

    There are two target lists on the same SharePoint Online site that I was able to test with.   Let's call them List A and List B.

    If I configure this new test flow to add location information to List A it works.  I specify the same SharePoint site path and target list for both the "When an item is created" trigger and the "Update Item" action. This test succeeds in updating the SP list but only after waiting a couple of minutes for the changes to apply (which I am presuming is due to the triggers checking every 5 minutes for status).  

     

    If I modify the flow to use List B for both the "When a new item is created" trigger and "Update Item" action the flow fails with this error:

    "Unable to process template language expressions in action 'Update_item' inputs at line '1' and column '2081': 'The template language expression 'body('Get_user_profile')?['OfficeLocation']' cannot be evaluated because property 'OfficeLocation' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details."

     

    The only parameter that changes in this new test, that I can see, is the target list.  I am wondering why the step would succeed for one list on a site but fail for another given the column types match.  I mentioned previously in this thread that the column type is Single Line of Text for both lists.  I understand there are limitations for Flow to update certain column types (i.e. choice columns etc.) yet this is not the case here.

  • GrantCocco Profile Picture
    8 on at
    Re: SharePoint "Update Item" step fails (when the same type of step to working in another

    Hello Michael

    For the Update Item step I have it configured to update the SharePoint list item in order to gather a users office location. The SP list has a column "Presented to" which is configured as a people picker. 

    • I am using the Get user profile action.   
    • In the Get user profile step I am using the dynamic content Presented To Email to identify which user profile to pull data from.  
    • In the Update Item Step I am using the dynamic content Office Location selected from the options available for Get User Profile.

    In my example, would the "Get my profile" action retrieve the user profile for the creator of the flow or profile data for the individual submitting the SP list item?  This would make a differnce to me depending on the use case for the flow.  If I wanted to create a "personal" flow, to manage my mail attachments I'm fine with the step "Get My Profile" running under the context of me as the individual who created the flow.  However, with a SharePoint list I might needed to obtain the profile information for the person who is submitting/modifying the SP list item or an individual specified in a list column for that item. Currently I am the only one doing testing so I am both the flow owner and the new item creator.    

    FlowError.JPG

     

     

     

  • v-micsh-msft Profile Picture
    on at
    Re: SharePoint "Update Item" step fails (when the same type of step to working in another

    Hi @GrantCocco,

     

    Could you please share the Update item configuration details here?

    Just from the error message, it seems that are errors when querying the actual data with the Office 365 users service.

    Have you used the Office Location information in the first Flow update item Action?

    If you would like to get the office location, then take use of the Azure AD connector, input with the User Email:

    48.PNG

     

    Then use the Location information from the Azure AD Get user Action.

    Regards,

    Michael

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >