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 Apps / Can PowerApps search t...
Power Apps
Answered

Can PowerApps search the Default 'ID' field in SharePoint

(0) ShareShare
ReportReport
Posted on by Microsoft Employee
Hello all,

Has anybody had success or know how to enable PowerApps to search the Default SharePoint ID column. I currently have a ReferenceID that is a lookup field in my SharePoint list but I just now realized that will not work as I would have to go in every instance to update the lookup column (ReferenceID).

I'm on mobile right now but I'll post my current code solution for viewing as well as screen shots. I am looking to allow my users to input the ID number into a text field and sort a gallery to find that ID.

Thanks all,
-Tom
Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    I wanted to add some clarification.

    I tried to originally filter my gallery by the default SharePoint list ID but that would not work. That's what made me think, I'll just use a lookup column so my SharePoint list will pull the default ID into my new column. I thought I was smart, haha! Turns out my mind was thinking of calculated column functionality. Which in this case will not work with the default ID.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello all,

     

    I was hoping by now someone would have shared some similar experience but maybe I haven't supplied enough information. Please see below code statements and attached screenshots to understand functionality.

     

    I did find an interim solution but that solution was defeated moments ago. I was able to successfully create a new SharePoint Column called RefID which was a calculated column where I specifically told the formula to "look" at the default ID and populate itself into this new column. It worked.... Up until I update an item in my SharePoint list using my PowerApps. The RefID column resets to zero and I get sad.....

     

    Alright, enough of that. See below for code and screenshots.

    SortByColumns(Filter(Filter(Filter(Filter(Filter(iProductIssues, StatusValue <> "Not Assigned"), 
     StartsWith(RefID, SearchInput_9.Text)),
     StartsWith(Title, SearchInput_1.Text)), 
     StartsWith(OwnerValue, SearchInput_2.Text)),
     StartsWith(IssueAdminValue, SearchInput_5.Text)),
     "PriorityValue", 
     If(SortDescending1,Descending,Ascending))

    The underlined code statement is the one I wish I could just type in:

    StartsWith(ID, SearchInput_9.Text

     

    Unfortunately, PowerApps will not let me search the default ID column in SharePoint by doing this.  Grrr..

     

    Here is what my UI looks like to give a better understanding of functionality:User Interface Search FunctionalityUser Interface Search Functionality

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Basically, my users can search the gallery multiple ways but the ID field is a critical one as once an issue is assigned, that user can simply type the ID number and go right to it.

     

    I'm open to ideas on how to fix this.

     

    Here is also my SharePoint Column formatting:SharePointListFormatting.JPG

     

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello all,

     

    Persistence or insanity eventually pays off. I did some deep searching and read about someone else doing something completely different as to what I was trying to do. Turns out there was a little gem tucked away in an old 2017 post. I applied the following code statement and got my search function to work!!!! See below for solution in case anyone else in the future runs along the same issue I did. The working code statement is: StartsWith(Text(ID), (YourInputName).Text)). 

     

    SortByColumns(Filter(Filter(Filter(Filter(Filter(iProductIssues, StatusValue <> "Not Assigned"), 
     StartsWith(Text(ID), SearchInput_9.Text)),
     StartsWith(Title, SearchInput_1.Text)), 
     StartsWith(OwnerValue, SearchInput_2.Text)),
     StartsWith(IssueAdminValue, SearchInput_5.Text)),
     "PriorityValue", 
     If(SortDescending1,Descending,Ascending)

    Search ID Function StartSearch ID Function Start

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Showing ID for ReferenceShowing ID for Reference

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Search ID Function EndSearch ID Function End

  • JimmyW Profile Picture
    2,567 on at

    @Anonymous 

    Hi sorry for asking in an old post.

    But using this method i can only pull the first 500 items because the calculated column cannot be delegated?

     

    Im trying to find away here but the only way possible for this looks like to create a single text column and not use a calculated column. So when the user submits it updates the single text column with the same ID from the ID column. But if i use the way you describe i will only pull the first 500 items correct?

  • bruleto Profile Picture
    20 on at

    Here's how I worked around this. I created a column in my SharePoint List called "IDSearch". I then setup a Flow that copies the ID value to the "IDSearch" field when a new item is created. In PowerApps, I search using the "IDSearch" column and everything works smoothly. 

  • MShelnutt Profile Picture
    381 on at

    @bruleto I would love to see the details of how you set your flow up for this.  I need to do this too.

     

    Thanks,

  • A8Tony Profile Picture
    66 on at

    Simple, yet effective. I like it 👍

  • evanderbilt Profile Picture
    10 on at

    I made a helpdesk app and used this to search by either the ID field or the Title field (Ticket subject). Just a little simpler than the solution I saw posted.

     

    Search(
     AddColumns(
     Tickets,
     "IDasText",
     Text(
     ID,
     "0"
     )
     ),
     TicketSearchBox.Text,
     "Title",
     "IDasText"
    )

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard