cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rmaziwis
Resolver I
Resolver I

How to filter and search in power apps

Hi All 

 

Please help I have made changes to restrict my app showing information to a user based on a default branch now my issue is 

 

1.I need to search multiple columns after the status of incident and it should search by Location ,Injury classification ,on site/offsite etc :  Filter('[rp].[Form InjuriesOnDutyF]',Siteofincident = varBranch && 'txt.InjuriesOnduty.Text'.Text in StatusOfincident)

 

2.I need to sort the results in descending order using an Id number which is incremental number so that it sorts the last number created/ saved  first below it must 16 then15

Filter('[rp].[Form InjuriesOnDutyF]',Siteofincident = varBranch && 'txt.InjuriesOnduty.Text'.Text in StatusOfincident),Id,Descending)

the above just wont work ,i tried to add a sortbycolumn with no luck.Filter issue.PNG

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
eka24
Super User III
Super User III

Use

Sort(Filter('[rp].[Form InjuriesOnDutyF]',Siteofincident = varBranch && 'txt.InjuriesOnduty.Text'.Text in StatusOfincident),Id,Descending)

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Please check the spelling of the column names if they are all ok. The formula looks fine

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

9 REPLIES 9
eka24
Super User III
Super User III

Use

Sort(Filter('[rp].[Form InjuriesOnDutyF]',Siteofincident = varBranch && 'txt.InjuriesOnduty.Text'.Text in StatusOfincident),Id,Descending)

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

@eka24 thanks can you also me with search of multiple columns including Status Of incident  part Filter('[rp].[Form InjuriesOnDutyF]',Siteofincident = varBranch && 'txt.InjuriesOnduty.Text'.Text in StatusOfincident)

use:

Filter(Search('[rp].[Form InjuriesOnDutyF]',Siteofincident ,txt.InjuriesOnduty.Text,"StatusOfincident","Column2","Column3"),Siteofincident=varBranch )

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

eka24
Super User III
Super User III

Are you ok with the Search

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24 not yet I still get errors

 I even tried Filter(Search('[rp].[Form InjuriesOnDutyF]',Siteofincident,txt.InjuriesOnduty.Text,"COIDclaimnumber","BodyPart"),Siteofincident=varBranch )

 

 Search error.PNG

Please look at the formula very well.

What is the name of the search Text box,

Change SearchTextBox to the name of your search Textbox

 

Filter(Search('[rp].[Form InjuriesOnDutyF]',Siteofincident,SearchTextBox.Text,"COIDclaimnumber","BodyPart"),Siteofincident=varBranch )

@eka24  not sure what is happening i gor an error i renamed the SearchBoxAnother Error.PNG I got an error 

Please check the spelling of the column names if they are all ok. The formula looks fine

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

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

@eka24  Thank you so much 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,349)