cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Seuadr
Helper IV
Helper IV

sharepoint get items - two similar entries, but only returning 1?

Hi all,

 

I have a flow that takes an email, gets items from a sharepoint list, and then either creates, or updates an item in the sharepoint list based on if it exists or not.

 

the problem i am running into is there are two entries in the sharepoint list that are very similar, but, not exactly the same - but get items is only returning one?

so - here is my flow:

Seuadr_0-1626272141823.png

Seuadr_1-1626272190632.png

Seuadr_2-1626272219783.png

now - here is the input email:

"<BL0PR12MB2531DB8A0F1BDF55EB8059D5A8139@BL0PR12MB2531.namprd12.prod.outlook.com>","subject":"2 new Messages","bodyPreview":"Message 1:\r\nMonday, 07/12/2021 at 07:45:25. The Point ANT.REF 1330C COOKED MEAT.ALM is in Alarm at PRI3.\r\n\r\n\r\nMessage 2:\r\nMonday, 07/12/2021 at 07:45:25. .\r\nAlarm Message: ANT_COOL_1330C_MONR                            **= \r\n\r\nMessage 1:\r\nMonday, 07/12/","importance":"normal","conversationId":"AAQkAGJlZDM0NDk4LTUxODYtNDI0Ny1iMjM3LTRjZTgzYjA2NTE5NAAQAPDrM-tjPEmFpD6RqMaHzvA=","isRead":true,"isHtml":false,"body":"\r\nMessage 1:\r\nMonday, 07/12/2021 at 07:45:25. The Point ANT.REF 1330C COOKED MEAT.ALM is in Alarm at PRI3.\r\n\r\n\r\nMessage 2:\r\nMonday, 07/12/2021 at 07:45:25. .\r\nAlarm Message: ANT_COOL_1330C_MONR                            **= \r\n\r\nMessage 1:\r\nMonday, 07/12/2021 at 07:45:25. The Point ANT.REF 1330C COOKED MEAT is in Alarm at PRI3.\r\n\r\n\r\nMessage 2:\r\nMonday, 07/12/2021 at 07:45:25. .\r\nAlarm Message: ANT_COOL_1330C                           **=\r\n","from":"IPF.SA.HVACFlow@msu.edu","toRecipients":"","attachments":[]}}

the plain text looks like:

Message 1:
Monday, 07/12/2021 at 07:45:25. The Point ANT.REF 1330C COOKED MEAT.ALM is in Alarm at PRI3.


Message 2:
Monday, 07/12/2021 at 07:45:25. .
Alarm Message: ANT_COOL_1330C_MONR                            **= 

Message 1:
Monday, 07/12/2021 at 07:45:25. The Point ANT.REF 1330C COOKED MEAT is in Alarm at PRI3.


Message 2:
Monday, 07/12/2021 at 07:45:25. .
Alarm Message: ANT_COOL_1330C                           **=

now, my "get items" for this is huge - because there are a couple hundred entries in the list, but, here is the only entry that gets returned with 1330C even though they both show up in the list:

Seuadr_3-1626272414098.png

@odata.etag": "\"44\"",
        "ItemInternalId": "2645",
        "ID": 2645,
        "Title": "ANT.REF 1330C COOKED MEAT is in Alarm at PRI3.",
        "Timestamp": "2021-07-14T13:34:40Z",
        "Modified": "2021-07-14T13:35:58Z",
        "Created": "2021-06-21T11:57:01Z",
        "Author": {
            "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            "Claims": "i:0#.f|membership|NAME",
            "DisplayName": "NAME",
            "Email": "NAME",
            "Picture": "SITE/_layouts/15/UserPhoto.aspx?Size=L&AccountName=NAME",
            "Department": "NAME",
            "JobTitle": null
        },
        "Author#Claims": "i:0#.f|membership|NAME",
        "Editor": {
            "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            "Claims": "i:0#.f|membership|NAME",
            "DisplayName": "NAME",
            "Email": "NAME",
            "Picture": "SITE/_layouts/15/UserPhoto.aspx?Size=L&AccountName=NAME",
            "Department": "NAME",
            "JobTitle": null
        },
        "Editor#Claims": "i:0#.f|membership|NAME",
        "{Identifier}": "Lists%252fANT%2bAlarms%252f2645_.000",
        "{IsFolder}": false,
        "{Thumbnail}": {
            "Large": null,
            "Medium": null,
            "Small": null
        },
        "{Link}": "SITE/_layouts/15/listform.aspx?PageType=4&ListId=ea4c302d%2Df80f%2D431b%2D9a68%2D2c36eface8f4&ID=2645&ContentTypeID=0x01002E231A81D73B5843A466CB8233B2FA1100E0CCE010EF03D141BA62D8ED2BB56ABE",
        "{Name}": "ANT.REF 1330C COOKED MEAT is in Alarm at PRI3.",
        "{FilenameWithExtension}": "ANT.REF 1330C COOKED MEAT is in Alarm at PRI3.",
        "{Path}": "Lists/ANT Alarms/",
        "{FullPath}": "Lists/ANT Alarms/2645_.000",
        "{HasAttachments}": false,
        "{VersionNumber}": "44.0"
    },

so, when i get down to filter_array_3, i don't get a match, and it creates a new item.


 

this is what it creates:

{
  "@odata.etag": "\"1\"",
  "ItemInternalId": "2823",
  "ID": 2823,
  "Title": "ANT.REF 1330C COOKED MEAT.ALM is in Alarm at PRI3.",
  "Timestamp": "2021-07-14T14:06:43Z",
  "Modified": "2021-07-14T14:08:49Z",
  "Created": "2021-07-14T14:08:49Z",
  "Author": {
    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    "Claims": "i:0#.f|membership|EMAIL",
    "DisplayName": "NAME",
    "Email": "EMAIL",
    "Picture": "SITE/_layouts/15/UserPhoto.aspx?Size=L&AccountName=EMAIL",
    "Department": "DEPT",
    "JobTitle": null
  },
  "Author#Claims": "i:0#.f|membership|EMAIL",
  "Editor": {
    "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    "Claims": "i:0#.f|membership|EMAIL",
    "DisplayName": "NAME",
    "Email": "EMAIL",
    "Picture": "SITE_layouts/15/UserPhoto.aspx?Size=L&AccountName=EMAIL",
    "Department": "DEPT",
    "JobTitle": null
  },
  "Editor#Claims": "i:0#.f|membership|NAME",
  "{Identifier}": "Lists%252fANT%2bAlarms%252f2823_.000",
  "{IsFolder}": false,
  "{Thumbnail}": {
    "Large": null,
    "Medium": null,
    "Small": null
  },
  "{Link}": "SITE_layouts/15/listform.aspx?PageType=4&ListId=ea4c302d%2Df80f%2D431b%2D9a68%2D2c36eface8f4&ID=2823&ContentTypeID=0x01002E231A81D73B5843A466CB8233B2FA1100E0CCE010EF03D141BA62D8ED2BB56ABE",
  "{Name}": "ANT.REF 1330C COOKED MEAT.ALM is in Alarm at PRI3.",
  "{FilenameWithExtension}": "ANT.REF 1330C COOKED MEAT.ALM is in Alarm at PRI3.",
  "{Path}": "Lists/ANT Alarms/",
  "{FullPath}": "Lists/ANT Alarms/2823_.000",
  "{HasAttachments}": false,
  "{VersionNumber}": "1.0"
}

 

just to sanity check myself, i exported the list and filtered for the items in 1330C:

Seuadr_4-1626273539539.png

 

i'm not really clear on why it isn't returning all of the list items that have 1330C?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ScottShearer
Super User
Super User

@Seuadr 

Get items will return only 100 items by default and a maximum of 5000 items unless you have a premium license.  So, it is possible that you are not seeing all of the response that you should because 100 items are being returned.

To resolve your issue try the following:

  1. Go to the Get Items action settings
  2. Set pagination to On and set the threshold to a maximum of 5000 items.

image.pngimage.png

 

Unfortunately you can't use a filter query in your Get items action as "Contains" is not supported.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

2 REPLIES 2
ScottShearer
Super User
Super User

@Seuadr 

Get items will return only 100 items by default and a maximum of 5000 items unless you have a premium license.  So, it is possible that you are not seeing all of the response that you should because 100 items are being returned.

To resolve your issue try the following:

  1. Go to the Get Items action settings
  2. Set pagination to On and set the threshold to a maximum of 5000 items.

image.pngimage.png

 

Unfortunately you can't use a filter query in your Get items action as "Contains" is not supported.

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Seuadr
Helper IV
Helper IV

@ScottShearer spot on! i had no idea that it only returned 100 by default. that totally fixed it. thanks so much!

 

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (3,251)