cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Responsive Resident
Responsive Resident

How to show all records from sharepoint based on Status column

Hi All,

 

I m trying to show the records based on status, "All",  "Approved", "Pending", and "Rejected".

However, So far I have managed to get the records based on Approved and Pending Reject, But I Also want to Show all records, when a user clicks the All button. 

 

But the issue is im also getting the blank columns that do not have any value. Can anyone please let me know what I'm missing here or doing wrong.

 

 

Any advice or suggestions experts? Please.

 

 

Please see the screenshot and codes below. 

On Item Property of gallery: 

 

SortByColumns( 
   Filter(
   'Petty Cash & GL Code' ,
  
   
   
   (StatusResult = "All") || Status  = StatusResult  , 
   
  
   SearchBox.Text = "" || StartsWith('Name (Title)', SearchBox.Text)  
   ),
"Title",
If(SortDescending1, Descending, Ascending) 
) 

 

ON select of All button: 

 

UpdateContext({StatusResult:"All"}) 

 

On Select of Approved button:

 

UpdateContext({StatusResult:"Approved"}) 

 

On Select of Pending button: 

 

UpdateContext({StatusResult:"Pending"}) 

 

On Select of Reject button:

 

UpdateContext({StatusResult:"Rejected"}) 

 

 

The output im getting when I click All button 

 

Tapesh_0-1597923203387.png

 

The output I get when I click approved, rejected, and the pending button is fine as I actually wanted

 

Tapesh_1-1597923275827.png 

Tapesh_2-1597923386706.png

 

 

I want something like, if the user clicks he should see all applications made but not the blanks. 

 

Please also have a look at my SharePoint list for more clarification 

Tapesh_3-1597923597943.png

 


Your help is really appreciated by all experts. 

 

 

Thanks in advance. 😊

 

 

 

 

 

3 REPLIES 3
Super User III
Super User III

Try

SortByColumns(
If(StatusResult = "All",
'Petty Cash & GL Code' ,
Filter( 'Petty Cash & GL Code' ,
Status = StatusResult ,
StartsWith('Name (Title)',SearchBox.Text)) ), "Title", If(SortDescending1, Descending, Ascending) )

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

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.

Responsive Resident
Responsive Resident

Hi @eka24 

 

 

Thanks for the solution but I tried earlier as well, it seems like this is not working. 

Is there anything else you can help. 

Super User III
Super User III

Are you using excel or SharePoint.

Also show a screenshot of the formula with any errors

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

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.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,788)