cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
JonnySpitfire
Level: Power Up

Trying to get a Formula to work with a SharePoint List

Howdy, trying to get my PowerApp to filter and allow search on a bunch of SharePoint records...

 

These two lines work independently, i.e. on their own- but I need to combine so that both operate on the List in Question... one allows me to display all records and run a search box to look up an Account. The other forces a filter to just Orange Cases.

 

1. SortByColumns(Filter('MySharePoint List Data', StartsWith(Account, TextSearchBox2.Text)), "Account", If(SortDescending1, Descending, Ascending))

 

2. Filter('MySharePoint List Data', And('Status'="Orange"))

 

Tried a few things but I know someone out there is cleverer than I... How can I put the two together - syntax - so that it pre filters and allows me to search on Account? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Trying to get a Formula to work with a SharePoint List

HI @JonnySpitfire ,

Do you want to combine the two formula that you provided within your app?

 

I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Gallery to following:

SortByColumns(
Filter(
'MySharePoint List Data',
StartsWith(Account, TextSearchBox2.Text),
'Status' = "Orange" /* <-- Add this formula */
),
"Account",
If(SortDescending1, Descending, Ascending)
)

Or

SortByColumns(
             Filter(
                     'MySharePoint List Data', 
                      StartsWith(Account, TextSearchBox2.Text) && 'Status' = "Orange"
             ), 
             "Account", 
             If(SortDescending1, Descending, Ascending)
)

More details about Filter function, please check the following article:

Filter function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: Trying to get a Formula to work with a SharePoint List

Have you tried:

 

SortByColumns(Filter('MySharePoint List Data', StartsWith(Account, TextSearchBox2.Text), 'Status'="Orange"), "Account", If(SortDescending1, Descending, Ascending))


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Community Support Team
Community Support Team

Re: Trying to get a Formula to work with a SharePoint List

HI @JonnySpitfire ,

Do you want to combine the two formula that you provided within your app?

 

I have made a test on my side, please take a try with the following workaround:

Set the Items property of the Gallery to following:

SortByColumns(
Filter(
'MySharePoint List Data',
StartsWith(Account, TextSearchBox2.Text),
'Status' = "Orange" /* <-- Add this formula */
),
"Account",
If(SortDescending1, Descending, Ascending)
)

Or

SortByColumns(
             Filter(
                     'MySharePoint List Data', 
                      StartsWith(Account, TextSearchBox2.Text) && 'Status' = "Orange"
             ), 
             "Account", 
             If(SortDescending1, Descending, Ascending)
)

More details about Filter function, please check the following article:

Filter function

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JonnySpitfire
Level: Power Up

Re: Trying to get a Formula to work with a SharePoint List

Many thanks - sorted... 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 83 members 4,585 guests
Please welcome our newest community members: