cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Echo1409
Level: Powered On

Filter with SharePoint data source

Hello,

 

I am working on a simple help ticket search app. I got it to work with the original excel data source, but the plan is to now move to a SharePoint data source. The data still fills in, and I can see and scroll through my gallery, but when I try to search any ticket number it comes up blank.

 

Here is the code for the SharePoint version:

SortByColumns(Filter([@testtracker], TextInput1.Text in "TicketNumber"),"Title",If(true,Descending,Ascending))

 

And the Excel version:

SortByColumns(Filter([@Table1],TextInput1.Text in 'Ticket No.'),"Status",If(true,Descending,Ascending))

 

Any guidance would be greatly appreciated!

 

Thanks,

Jordan

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-siky-msft
Microsoft

Re: Filter with SharePoint data source

Hi @Echo1409 ,

 

Did you rename the column from Title to TicketNumber?

 

In a strange mechanism, power apps can only recognize the initial column name of SharePoint list, even if column has been already renamed it, so please try this code:

 

SortByColumns(
    Filter([@testtracker], StartsWith(Title, TextInput1.Text),
    "Title",
    Descending
)

 

Hope this helps.

Sik

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Filter with SharePoint data source

@Echo1409 

I would do it like this.  The double quotations beside ticket number are deleted because we want to use values in that column not the actual word "TicketNumber.  Then I replaced IN with the STARTSWITH function improve searchability.

 

SortByColumns(
    Filter([@testtracker], StartsWith(TicketNumber, TextInput1.Text),
    "Title",
    Descending
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Echo1409
Level: Powered On

Re: Filter with SharePoint data source

Hi @mdevaney,

 

I tried the updated code, but it does not identify TicketNumber in the SharePoint list, and the gallery comes up blank. I've attached a screen clip of the headers of the SharePoint list as well. Also a screen clip of the code to show where the errors are highlighted.

 

It just might be something weird with the SharePoint list on my end as well, as I am new to PowerApps and still trying to learn.

 

Thanks,

 

Echo1409

Microsoft v-siky-msft
Microsoft

Re: Filter with SharePoint data source

Hi @Echo1409 ,

 

Did you rename the column from Title to TicketNumber?

 

In a strange mechanism, power apps can only recognize the initial column name of SharePoint list, even if column has been already renamed it, so please try this code:

 

SortByColumns(
    Filter([@testtracker], StartsWith(Title, TextInput1.Text),
    "Title",
    Descending
)

 

Hope this helps.

Sik

View solution in original post

Echo1409
Level: Powered On

Re: Filter with SharePoint data source

@v-siky-msft,

 

Thanks! That worked. I'll keep that in mind for the future, and mark this as solved.

 

-Echo1409

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,695)