Demo of Get items, Select and Join in Power Automate

Sdílet
Vložit
  • čas přidán 8. 09. 2021
  • In this video, I'll show how to use Get items (SharePoint) action to retrieve a list of entries from a list based on a specific column's value, then extract a property from a Person field in that list and concatenate the email addresses into a single string.
  • Věda a technologie

Komentáře • 34

  • @medveolo
    @medveolo Před 2 lety +1

    Thank you! Finally an easy way to make this instead of trimming, replacing, etc... :)

  • @lobbi5000
    @lobbi5000 Před 2 lety +1

    Great demo, thank you for sharing your knowledge

  • @pradeepag161
    @pradeepag161 Před 5 měsíci +1

    Thank you , this helped!!

  • @StephanOnisick
    @StephanOnisick Před rokem +1

    Thanks Comment about Performance was good. I hate loops unless I absolutely have to use them. Question how would you reference a variable with Curly Braces like {Name) or {FilenameWithExtension}

    • @cvkealey
      @cvkealey  Před rokem

      It depends what type of data you have (an object, array, array of objects, etc.) and what you actually need to get out of it. As a general rule, to get a "property" from an object, you would use "item()?['property']". If you've got an array of objects (probably the most common format you'll work with), it would be "item()?[x]?['property']", where x is the integer index of the array element, starting at 0 (0 = 1st element, 1 = 2nd, etc.).

  • @bobbirowlett6728
    @bobbirowlett6728 Před 4 měsíci

    This is very streamlined. I really like this approach. I was wondering if there is a specific field that I want to target and sometimes this field has one item and other times it has several items. How do you account for that in this process?

    • @cvkealey
      @cvkealey  Před 4 měsíci +1

      I'm not sure I understand your use case. Is that field a multi-select column (e.g.: a choice or person column that allows multiple selections)? If so, the data returned will always be in "array" format, even if it's an array of one item. What is it you want to do with that data?

  • @jennafrench1021
    @jennafrench1021 Před 2 lety

    At the start of this video you are explaining an Audit or history log that connects multiple approvals & comments to one master list. We are looking to build something very similar. Would you have a recommendation on video(s) that might help us with this design & build?

    • @cvkealey
      @cvkealey  Před 2 lety

      I actually don't have anything recent, but was planning to include that in the Approvals series I'm working on. Stay tuned in the next week or so!

    • @jennafrench1021
      @jennafrench1021 Před 2 lety

      @@cvkealey that sounds great! Looking forward watching it. Thank you for all your videos!

    • @cvkealey
      @cvkealey  Před 2 lety +1

      @@jennafrench1021 in case you missed it, here is the video on creating an audit trail/log: czcams.com/video/BbXZ48ihmF4/video.html

  • @graeme13
    @graeme13 Před 3 měsíci +1

    Big help, thanks! I had been trying to filter directly on my HTTP request to PATCH, and that wasn't working. This works like a charm to find the correct item, then add the ID to my patch statement.
    Not sure if it will help anyone, but this is what I'm using in my COMPOSE to remove the brackets around the ID because it is returned as an array:
    replace(replace(string(outputs('YourSelectActionName')[0]), '[', ''), ']', '')
    Cheers!

    • @cvkealey
      @cvkealey  Před 2 měsíci

      You could do that, but when I'm using a Get items action that I know should only return one value, I use the first expression to get the ID. Something like "first('Get-items')?['ID']".

    • @pankajcarpenter8961
      @pankajcarpenter8961 Před 2 měsíci

      Thanks for sharing the expression. was looking for this solution.

  • @alvinramos5986
    @alvinramos5986 Před rokem

    So i have a column that has all the same value, how do i pull just that value of the first one to include in an email.

    • @cvkealey
      @cvkealey  Před rokem

      I'm not sure I understand what you mean. Does that column have the same value for every row? Can you describe your setup and what you're trying to accomplish?

  • @ljievsesd
    @ljievsesd Před 2 lety

    In the Select action, I’m not given the choice of choosing email (or display name etc.). I can only select the column name. I’m using a recurring trigger and have a filter in Get Items of modified is gt 7 days. Any idea what I’m doing wrong?

    • @cvkealey
      @cvkealey  Před 2 lety

      What kind/type of column is it? If it's a person column (without "allow multiple selections" enabled), you should see the sub-properties. If you are allowing multiple selections, you'll just see the column name. I have another video on working with multi-select person columns around here somewhere.

    • @cvkealey
      @cvkealey  Před 2 lety

      czcams.com/video/fjYNT0EgzAU/video.html

    • @ljievsesd
      @ljievsesd Před 2 lety

      Ah ok it’s because I’m allowing multiples. I saw your other video as well. My flow is pulling a weekly summary of changed items and putting them into an html table, and I have more than one column with multiple people. How do I get the output of the “compose/select/join” actions to show as an option in the html table? And do that multiple times within the same table?
      Thank you for replying!

    • @cvkealey
      @cvkealey  Před 2 lety +1

      @@ljievsesd You will need to get comfortable with using expressions, particularly the item() and items() expressions. I'm still getting there myself ;). If you can post a message with some screenshots of your flow over in the Power Automate community (powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity), I or one of the other folks there can take a look and help you find the solution. It's kind of tough to diagnose/troubleshoot via CZcams comments.

    • @ljievsesd
      @ljievsesd Před 2 lety

      @@cvkealey Unfortunately it’s for work so I’m unable to post any pics but I will keep working on it. But…if I get really stuck, I’ll reach out again 😁
      Your videos have been helpful! Thanks so much for the content and knowledge you share with us 🙏🏻

  • @miguelos2
    @miguelos2 Před rokem

    How to solve when the searched list element does not exist in the sharepoint list?

    • @cvkealey
      @cvkealey  Před rokem +1

      I'm not sure what you mean. Can you provide an example or more detailed description? The short answer is that "Get items" is only going to return items that exist, and the only columns you can get data from are those that exist in the list.

    • @miguelos2
      @miguelos2 Před rokem

      @@cvkealey Ok, for example, in a PVA bot, a user passes a ticket number and this number is searched in a sharepoint list and returns the other data. BUT what happens if the number you enter does NOT exist in the list. How to handle the error that "StatusCode" 404 in this case?

    • @cvkealey
      @cvkealey  Před rokem +1

      @@miguelos2 Ah, OK...well, in the case of "Get items", the action won't fail, but will return an empty set. So, I would suggest using a condition after the Get items action to evaluate whether it returned any data. Checking for "null" can be...complicated. I prefer to use the "length" expression. See this video for a brief explanation and example: www.screencast.com/t/LxrOV91Cf

    • @miguelos2
      @miguelos2 Před rokem +1

      @@cvkealey Thanks Chad!

  • @sergelensaranmandah3986

    How do i connect 2 sharepoint list items to 1 master list
    list 1: proj name: test1
    list 2: proj name: test2
    master list: proj names: test1 ; test2 like this

    • @sergelensaranmandah3986
      @sergelensaranmandah3986 Před 2 lety

      but not only one column at least connect 7 column

    • @cvkealey
      @cvkealey  Před 2 lety

      @@sergelensaranmandah3986 I'm not sure I understand what you have in mind, and a comment thread in CZcams is not the best place to have a conversation about it. I would strongly recommend posting a message in Microsoft's Tech Community (the SharePoint channel) or one of the many different SharePoint groups on Facebook. Be sure to clearly describe what you want to achieve. It like you want to build a relational database, which is not really what SharePoint is meant for, so be prepared for others to suggest other options like Dataverse or SQL server.

  • @liko8019
    @liko8019 Před rokem

    some nonsense