cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Can PowerApps search the Default 'ID' field in SharePoint

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
1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

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

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

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.
Anonymous
Not applicable

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

 

 

Anonymous
Not applicable

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

@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?

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. 

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

 

Thanks,

Simple, yet effective. I like it 👍

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,369)