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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / When a file is created...
Power Automate
Answered

When a file is created or modified = Update properties in an item list

(1) ShareShare
ReportReport
Posted on by 758 Season of Giving Solutions 2025
Hi guys!
 
So I have a Master list which contains the status and all files in the SharePoint site. The thing is that is creating duplicates of the items when updating them, and I want to update the columns and not create others.
 
I have a column options which have the options in the store tems in SharePoint. So the process is: they create the file in the library, and then they update the properties (column) manually. I want that properties update in the list but it doesn't works correctly. 
 
This is the flow I have:
 
The "Paraules Clau" and "Codis Estàndar" are option columns with the terms stored in the SharePoint. What should I change to get correctly the "Paraules clau" in the list right? I am only getting one and a code after it, but in the flow ran it shows that it applies to each three options I added in the file properties in the library:
 
Maybe I have to create condition, if its not created, create the item and if its created update the properties? 
 
Thanks for the info.
Categories:
I have the same question (1)
  • Suggested answer
    Srini007 Profile Picture
    3,467 Super User 2026 Season 1 on at
     
    I'm confused why you have Apply to each and inside that you have the update item? Something you are not passing it correctly, check the output of the create item and pass it correctly, it should not be Apply to each surronded
     
    If you can expand and explain step by step, we can help you
     

    (If this answers your question you can mark as Answered and give it a Like)

    Regards,
    Srini
  • chiaraalina Profile Picture
    1,882 Super User 2026 Season 1 on at
     
    It seems your Create item action runs on every trigger.  This means every time the file changes, a new list item is created instead of updating the existing one. You have to add a condition.
  • Charlie Martharper Profile Picture
    758 Season of Giving Solutions 2025 on at
     
    It creates when I add the Value of the "Paraules Clau", that column is an option type column, then when I add 2 or more options I think it works for each one.ç
    The store terms is Taula Termes SharePointSP and it has all the options it should be added in that column. I guess it creates the apply to each beacuse is a multiple option column also, so if it could be able to be more than one key word, it appears the apply to each.
    1st word
    2nd word
    3rd word:
     
    But when I go to the list, I only see the Abdominal and the code after it on another item created. I want to update the one is created. I will shouw you the store terms with the words:
     
    What should I do to be able to:
     
    1. Create the item (only if it's not created before)
    2. Update the item once it's created with full options in the type option columns.
     
    Thanks!
     
  • Srini007 Profile Picture
    3,467 Super User 2026 Season 1 on at
     
    Since you are getting multiple values, as it is a choice column, but if you need only one to be selected out of it then you can create a expression to pick exactly that value, if you can provide us the raw outputs, to see the json output and what value you need to be selected
     

    (If this answers your question you can mark as Answered and give it a Like)

    Regards,
    Srini
  • Charlie Martharper Profile Picture
    758 Season of Giving Solutions 2025 on at
     
    I show you one example, like the choice abdominal: There could be more than one choice, so thats why there is apply to each. But I need all of them in 1 item only not one for each "paraula clau" (key word). No duplicates as it shows in posts before.
    {
     
      "Paraules_x0020_Clau": "Abdominal|99e359ad-138a-ef",
     
      },
     
    So that is the word, but I don't know why I get that code after it. I should only show "Abdominal" nothing more, as its the word stored in the list.
     
    I dont know if that is what you need.
     
    Could you send an example image of the flow with the coindition (if it's created just update and if not created create + update)
     
    Thanks for your time and help. I dont really work on IT but Im trying my best to understand.
  • Charlie Martharper Profile Picture
    758 Season of Giving Solutions 2025 on at
     
    I will be doing some tries. But the other thing is what I told to @Srini007, there can be multiple selections in one column and I was
    having probles to solve it.
     
    It creates an apply to each when trying to update the items because it's multiple choice selection column. And I just want to 1 item por selection, not multiple, but if there's more than 1 (its my case), I want them to apper on the same item, no duplicates
     
    Thanks for your help. If you could screenshot the flow would be better for me. :)
  • Charlie Martharper Profile Picture
    758 Season of Giving Solutions 2025 on at
    Hi,
     
    I changed the flow, the condition is if ID is equal to created --> If yes get item (it doesn't get the item created and it creates another one all the time).
     
    Look the list:
    It is obvius that they will first create the file. So when adding the metadata to the columns, I don't want to run the "Create item", just the "update item". And it seems I am getting another one created but with just 1 of the multiple choices with a code after it, and I want just to be the words.
     
  • Suggested answer
    Srini007 Profile Picture
    3,467 Super User 2026 Season 1 on at
     
    Thank you for providing more details, For the multi status to select, check below video for your reference
     
     

    (If this answers your question you can mark as Answered and give it a Like)

    Regards,
    Srini
  • Charlie Martharper Profile Picture
    758 Season of Giving Solutions 2025 on at
     
    Hey, I watched and I have a question, how I add the term store values in the compose tag string.
     
    Don't know how to split them. Shall I follow the flow step by step? Shouldn't I need to adapt it to my need, as itt's when file is created and not when item is created.
     
    Thanks for the info!
  • Verified answer
    chiaraalina Profile Picture
    1,882 Super User 2026 Season 1 on at
     
    Sure, here is a screenshot. This is what I would do:
     
     
     
    1. First you have to get all items where Identificador eq @{triggerOutputs()?['body/Identificador']} (from your Master List) to identify.
    2. Select (prepare multi-select field)

      From: @{triggerOutputs()?['body/Paraulaclau']}
      Map: Value    |   @item()['Value']
      This produces a simple JSON array like:
      [
        {"Value":"Choice 1"},
        {"Value":"Choice 2"}
      ]
    3. Condition: Add a condition that checks whether a matching item was found: length(outputs('Get_items')?['body/value'
    4.  Update or create item: For update item, use the ID form the found record as ID @{first(outputs('Get_items')?['body/value'])['ID']}
    5. For both create item and update item: Set Paraula clau to @{outputs('Select_Paraulaclau')} (Output from the Select) and fill in the remaining fields (Status, Title, etc.) from the trigger and set Identificador to prevent duplicates

    And let me know if it worked!
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 569

#2
Valantis Profile Picture

Valantis 484

#3
Vish WR Profile Picture

Vish WR 460

Last 30 days Overall leaderboard