web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Update Specific field in a SP list

(0) ShareShare
ReportReport
Posted on by 60

Hello! I am going a bit nuts trying to figure this out...

 

What I'm trying to do... When a new response is submitted from a webform where clearance name in the webform is equal to title in the SharePoint list, update the SharePoint row that has the same clearance/title and update the fields Curricula/training (text field), primary owner (person field), alternate owner (person field, could be null, or could have more than one) last modified by person field, and last modified date. On success send an email to the Primary and alternate people

 

The outcome I'm getting, is it will update all of the list to those values entered from the webform. If there is no alternat, or more than one is entered.... it just fails.

One problem I have is the ID... not sure the best way around this...

I have the same question (0)
  • v-jefferni Profile Picture
    on at
    Re: Update Specific field in a SP list

    Hi @joeuser1 ,

     

    I don't think the false branch is needed. In get items action, use the filter query to get items that title is equal to clearance name. Then condition control is not needed as well. Just apply to each and update item.

     

    For the alternate owner column, you will need to generate an array variable to include all claims. Since I'm not aware how would users enter alternate owners in the form, I'm not able provide a detailed solution for you. You can refer to below blog to know how to generate the array:

    Power Automate: Populate SPO User Claims (multiple claims) | console.log('Charles'); (charleslakes.com)

     

    To use the array for the alternate owner column of Update item action, you will also need an expression, checking if the array is empty otherwise the flow will fail due to empty input error:

     

    vjefferni_0-1688443221875.png

    switch to input array first.

    vjefferni_1-1688443285796.png

    use if function.

     

    Best regards,

  • joeuser1 Profile Picture
    60 on at
    Re: Update Specific field in a SP list

    Thanks for the response.

    In the form for the alternate, they would be filling out a webform with the email of the person separated by a ;

    I think I'm getting closer, but now I need to figure out how more than one email can be added to the person field, or a null.

     

    I'm able to split my select, but not sure how hot to get it to enter on the SP list.

    joeuser1_0-1688575737235.png

    joeuser1_1-1688575782681.png

    My split: split(outputs('Compose_2'),';')

    My If: if(equals(item()?['Compose_2'], ''),null, item()?['Output'])

     

     

    Thanks again.

  • v-jefferni Profile Picture
    on at
    Re: Update Specific field in a SP list

    Hi @joeuser1 ,

     

    OK, so all the alternate owner emails would be in one answer. Then please move your Compose2 and Select above the Apply to each control, the variable is not needed anymore, drag Update item into Apply to each control. if expression:

    if(empty(body('Select')), null, body('Select'))

     

    Best regards,

  • joeuser1 Profile Picture
    60 on at
    Re: Update Specific field in a SP list

    Looks like I'm doing something wrong..

    I've tried a few variations of the of the split in the select statement, but still not getting it..

     

    split(outputs('Compose_2')?['Alternate Owner(s) Email?'], ';')

    InvalidTemplate. Unable to process template language expressions in action 'Select' inputs at line '0' and column '0': 'The template language expression 'split(outputs('Compose_2')?['Alternate Owner(s) Email?'], ';')' cannot be evaluated because property 'Alternate Owner(s) Email?' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions for usage details.'

     

     

     

    I placed this: 

    if(empty(body('Select')), null, body('Select'))

    in the Alternate owner field in the Update Item

     

    Or the one in the screen capture

     

    joeuser1_0-1688984752167.png

    ________________________________________________________________

    joeuser1_2-1688984909295.png

    Thanks for your help on this!!! I really appreciate it.

  • v-jefferni Profile Picture
    on at
    Re: Update Specific field in a SP list

    Hi @joeuser1 ,

     

    Just no need to use Compose, use the answer from Get response details in split function directly and set the expression in Select action.

    vjefferni_0-1689042706015.png

    split(outputs('Get_response_details')?['body/question'],';')

     

    Or if you really need the Compose to check some result in run history:

    split: 

    split(outputs('Compose_2'),';')

    If:

    if(empty(body('Select')), null, body('Select'))

     

    Best regards,

  • joeuser1 Profile Picture
    60 on at
    Re: Update Specific field in a SP list

    Still having issues...

    I changed the split in "select" to split(outputs('Get_response_details')?['body/question'],';')

    but I get the error

    Unable to process template language expressions in action 'Select' inputs at line '0' and column '0': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#split for usage details.'.

     

    So far no matter what I try it stops at the Select.

    Any ideas what I could be doing wrong?

    Thank you for taking time to help me!

     

    joeuser1_0-1689070902778.png

    I think part of my problem might be because I'm trying to update an item vs create an item.  The problem with update an item, it wants an ID, so the select cannot find the id in the update item..?

     

  • joeuser1 Profile Picture
    60 on at
    Re: Update Specific field in a SP list

    Okay, I think I'm very close! I can add a single, or multiple to the Alternate field, but if its null it fails.

    Here is what I have.

    joeuser1_0-1689090332292.png

    Split in the Apply to each 2: split(outputs('Compose'),';')

     

    joeuser1_1-1689090432676.png

     

  • v-jefferni Profile Picture
    on at
    Re: Update Specific field in a SP list

    Hi @joeuser1 ,

     

    split in "select": split(outputs('Get_response_details')?['body/question'],';')

    The bold part is actually what you have put in Compose, I don't know what's the question so I typed common syntax.

     

    What you have done is correct as well. Have you tested your flow? Will it work?

     

    Best regards,

  • joeuser1 Profile Picture
    60 on at
    Re: Update Specific field in a SP list

    No it fails. I did come up with something that works but fails on nulls.

    This is the process I used to get it to work for the most part:

    Solved: Re: Updating SharePoint-Field (Type Person or Grou... - Power Platform Community (microsoft.com)

     

    I also tried a condition, but no matter what I enter for data in the webform (one alternat, 2, null) it always thinks the condition is "If no". So long story short, if the submitted webform has a value in alternat it works. If there is no value it fails. whether or not there is data in the webform submission in the alternate field, power automate always goes to the "If No" side of the condition.

    I have tried multiple variations on the condition. One variation will always provide "If Yes" and another variation will always fall on "if no"

    I'm so close.... 

    Any other ideas?

    joeuser1_0-1689158042040.png

    joeuser1_2-1689158121760.png

     

     

  • Verified answer
    joeuser1 Profile Picture
    60 on at
    Re: Update Specific field in a SP list

    @v-jefferni  I figured it out!

    joeuser1_0-1689169025696.png

    Split in apply to each 2: 

    split(outputs('Compose'),';')

    joeuser1_1-1689169087335.png

    joeuser1_2-1689169252146.png

     

     

     

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard