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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Items - Returning ...
Power Automate
Suggested Answer

Get Items - Returning Null even though theres a value

(2) ShareShare
ReportReport
Posted on by 219
Hello,
 
I'm having an issue where within a Get Items action its returning zero values, even though within the List there is a record where the "Account Number" field (text field) matches whats in the Filter Query.
 
Below is the Get Items action:
 
This is the record its searching for within the List:
 
This is the Output of the Get Items, as you can see the value is blank:
"body": {
    "@odata.nextLink": "https://XXXXXXXXXXXXXXXX.common.europe002.azure-apihub.net/apim/sharepointonline/a43982b5f5XXXXXXXXXXXXXXXX/datasets/https%253A%252F%252FXXXXXXXX.sharepoint.com%252Fteams%252FXXXXXXXXXXXXXXStandard/tables/XXXXXXX-f389-41c7-XXXX-XXXXXXXXXXX/items?$filter=Account_x0020_Number+eq+%275537335%27&$skiptoken=Paged%3dTRUE%26RootFolder%3d%252fteams%252fXXXXXXXXXXXXStandard%252fLists%252fOutlets%26ix_Paged%3dTRUE%26ix_ID%3d5001%26ix_Key%3d00000000000000000000000000000000",
    "value": []
  }
 
Testing:
{
        "@odata.etag": "\"3\"",
        "ItemInternalId": "3",
        "ID": 3,
        "Title": "10504920",
        "Account_x0020_ID": "0011i00001XXXXXX",
        "Account_x0020_Name": "XXXXX BAKERY",
        "Account_x0020_Number": "10504920",
        "Account_x0020_Owner": "XXXXX Williams"
}
I've tried removing the Filter Query just to make sure data is returned and theres no permission issues, and it returns back data fine (see example above). I've also tried changing it from Account Number to Title since both fields contain the same value, but it still returns no results.
 
This is driving me insane on why it wont return anything when filter by Account Number, any help would be much appreciated.
 
Thank you.
Categories:
I have the same question (0)
  • CCEP_Mike Profile Picture
    219 on at
    Hi Michael,
     
    I'm going to assume you meant for me to have the Compose under the List Row, not above otherwise i wouldn't of been able to select the Dynamic Field to go within the Compose. So I've done as you've asked and the input and output look identical.
     
    So the field "Account Number" in the sharepoint list is a Text field as there can sometimes be letters.
     
    Thank you for your continued support Michael.
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,857 Super User 2025 Season 2 on at
    hi
     
    For option 1 you just literally do what I said. You know how to add a dynamic property (i see them in your flow) just type the characters --insertdynamic--
     
    Now one other thing you say number, but you are treating it as a String in your filter. So is it a Number or a String?
     
    If its a number remove the single quotes as that is the issue as it treats it as a 0. The reason its important to not "tell me" its right but show me is because the steps I ask for are important so I dont have to keep asking for it.
     
    If you inserted a string as encoded then possibly, which would mean you need to decode it before using the value. But I cannot tell because option 1 did happen. Unfortunately the filtering this will encode the single quotes into what you see.
     
    Best wishes
  • CCEP_Mike Profile Picture
    219 on at
    Hi both,
     
    Thanks fro your replies, I've tried both of your suggestions trice602 and its still not returning any results. Michael E. Gernaey I've looked at the results and i can confirm that the query is correct and its looking for the right number. I can also see that within the Output and looking at the @odata.nextLink value. I couldnt do your first suggestion as wasnt sure how to properly do it within my flow, see my full flow below.
     
    The strange thing is I'm having the exact same issue on another project/solution where its just returning 0 results when filtering via Account Number. One thing I'm seeing within the Output under @odata.nextLink is this:
     
    filter=Account_x0020_Number+eq+%275537335%27

    Do you think its actually searching for %275537335%27 instead of just 5537335? The strange thing is even if i remove the single quotes (which i believe i need because the field type is Text), it still adds them back in within the odata.nextLink in the output.
     
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,857 Super User 2025 Season 2 on at
    Hi,
     
    Please do this. Try both, either or it will tellyou the issue as I am certain its the value but
     
    1. Go into your flow and just above the list rows, please add a Compose. In that compose I want you to do the following
    type -- yes just type two dashes
    right after add the dynamic field you have in your Filter
    then type --
     
    So it looks like --DynamicField--
     
    I am asking you to do that to make sure that there are no spaces in the value and thats why its doing that.
     
    2. Go into your flow Run, where it failed, Please open that, go to the List Rows and review the actual filter you see. It will show you whether its really the right value or not.
     
    Cheers
  • Suggested answer
    trice602 Profile Picture
    15,799 Super User 2025 Season 2 on at
    Hi,
     
    Seems like one or both of these will solve this problem.  It could be a data type mismatch, try:
     
    Account_x0020_Number eq '@{string(triggerBody()?['Account Number'])}'
     
    And or there could be a space as the end of one of your values that you don't readily see:
     
    Account_x0020_Number eq '@{trim(triggerBody()?['Account Number'])}'
     
    I suspect it is the latter one, but this should help you resolve quickly.
     
     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and mark as a verified answer to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 370 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 258 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 207 Most Valuable Professional

Last 30 days Overall leaderboard