cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: How to show all records from sharepoint based on Status column

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.

Highlighted
Responsive Resident
Responsive Resident

Re: How to show all records from sharepoint based on Status column

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. 

Highlighted
Super User III
Super User III

Re: How to show all records from sharepoint based on Status column

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

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