i am creating out of office app. I want to add a feature where the person can click on submitted and approved to see both, which of his request has he submitted and which of the request is qpproved.
How should I go ahead with this problem?
Solved! Go to Solution.
Hi @mehul_sompura ,
Could you please share a bit more about your scenario?
Do you want to select multiple buttons within your app, then filter your Gallery Items based on the selected Request status (e.g. Submitted & Approved)?
Further, could you please share a bit more about the Filter formula you used within your app?
Based on the needs that you mentioned, I have made a test on my side, I think four global variables could achieve your needs. Please take a try with the following workaround:
The data source in my app is a SP list. The Status column in my SP list is a Choice type column, which has four available options -- Submitted, Approved, Declined and Cancel.
On your side, you need to set one global variable for each Buttons within your app. Set the OnSelect property of the SubmittedButton to following:
Set(Submitted, !Submitted)
Set the Fill property to following:
If(Submitted, RGBA(56, 96, 178, 1), RGBA(255, 255, 255, 1))
Set the OnSelect property of the ApprovedButton to following:
Set(Approved, !Approved)
Set the Fill property to following:
If(Approved, RGBA(56, 96, 178, 1), RGBA(255, 255, 255, 1))
Set the OnSelect property of the DeclinedButton to following:
Set(Declined, !Declined)
Set the Fill property to following:
If(Declined,RGBA(56, 96, 178, 1), RGBA(255, 255, 255, 1))
Set the OnSelect property of the CancelButton to following:
Set(Canceled, !Canceled)
Set the Fill property to following:
If(Canceled, RGBA(56, 96, 178, 1), RGBA(255, 255, 255, 1))
Set the Items property of the Gallery to following formula:
Filter( '20190325_case13', If( Submitted=false && Approved=false && Declined=false && Canceled=false, true, If(Submitted, Status.Value = "Submitted", false) || If(Approved, Status.Value = "Approved", false) || If(Declined, Status.Value = "Declined", false) || If(Canceled, Status.Value = "Cancel", false) ) )
On your side, you should type:
Filter( 'YourDataSource', If( Submitted=false && Approved=false && Declined=false && Canceled=false, true, If(Submitted, Status = "Submitted", false) || If(Approved, Status = "Approved", false) || If(Declined, Status = "Declined", false) || If(Canceled, Status = "Cancel", false) ) )
Note: The Status represents the column in your data source, which used to store the request status, e.g. "Submitted", "Approved", "Declined" and "Cancel". If your data source is also a SP list, and the Status column is also a Choice column, please take a try with above Filter solution I provided.
In addition, if you want to combine above Filter formula with the TextSearchbox within your app, please consider modify your formula as below:
Filter( Search('YourDataSource', TextSearchBox.Text, "SearchColumn1", "SearchColumn2", ...), If( Submitted=false && Approved=false && Declined=false && Canceled=false, true, If(Submitted, Status = "Submitted", false) || If(Approved, Status = "Approved", false) || If(Declined, Status = "Declined", false) || If(Canceled, Status = "Cancel", false) ) )
Note: If your data source is a SP list, when you take a try with above formula, you may face a Delegation warning issue. If the amount of your SP list records is not more than 2000, you could ignore this issue.
Please check the following GIF screenshot for more details:
Best regards,
Hi @mehul_sompura ,
Have you solved your problem?
If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.
Best regards,
Hi @mehul_sompura . This is an interesting use case! There are likely many ways to accomplish this. One way I'm thinking of is with variables.
Maybe give this a try:
Setup "toggle-like" feature of buttons:
If( IsBlank(varSubmitted), Set(varSubmitted, btn_submitted.Text), Set(varSubmitted, Blank() )
Setup correct filtering:
Maybe this helps you! Let us know!
Take care
Hi @mehul_sompura ,
Could you please share a bit more about your scenario?
Do you want to select multiple buttons within your app, then filter your Gallery Items based on the selected Request status (e.g. Submitted & Approved)?
Further, could you please share a bit more about the Filter formula you used within your app?
Based on the needs that you mentioned, I have made a test on my side, I think four global variables could achieve your needs. Please take a try with the following workaround:
The data source in my app is a SP list. The Status column in my SP list is a Choice type column, which has four available options -- Submitted, Approved, Declined and Cancel.
On your side, you need to set one global variable for each Buttons within your app. Set the OnSelect property of the SubmittedButton to following:
Set(Submitted, !Submitted)
Set the Fill property to following:
If(Submitted, RGBA(56, 96, 178, 1), RGBA(255, 255, 255, 1))
Set the OnSelect property of the ApprovedButton to following:
Set(Approved, !Approved)
Set the Fill property to following:
If(Approved, RGBA(56, 96, 178, 1), RGBA(255, 255, 255, 1))
Set the OnSelect property of the DeclinedButton to following:
Set(Declined, !Declined)
Set the Fill property to following:
If(Declined,RGBA(56, 96, 178, 1), RGBA(255, 255, 255, 1))
Set the OnSelect property of the CancelButton to following:
Set(Canceled, !Canceled)
Set the Fill property to following:
If(Canceled, RGBA(56, 96, 178, 1), RGBA(255, 255, 255, 1))
Set the Items property of the Gallery to following formula:
Filter( '20190325_case13', If( Submitted=false && Approved=false && Declined=false && Canceled=false, true, If(Submitted, Status.Value = "Submitted", false) || If(Approved, Status.Value = "Approved", false) || If(Declined, Status.Value = "Declined", false) || If(Canceled, Status.Value = "Cancel", false) ) )
On your side, you should type:
Filter( 'YourDataSource', If( Submitted=false && Approved=false && Declined=false && Canceled=false, true, If(Submitted, Status = "Submitted", false) || If(Approved, Status = "Approved", false) || If(Declined, Status = "Declined", false) || If(Canceled, Status = "Cancel", false) ) )
Note: The Status represents the column in your data source, which used to store the request status, e.g. "Submitted", "Approved", "Declined" and "Cancel". If your data source is also a SP list, and the Status column is also a Choice column, please take a try with above Filter solution I provided.
In addition, if you want to combine above Filter formula with the TextSearchbox within your app, please consider modify your formula as below:
Filter( Search('YourDataSource', TextSearchBox.Text, "SearchColumn1", "SearchColumn2", ...), If( Submitted=false && Approved=false && Declined=false && Canceled=false, true, If(Submitted, Status = "Submitted", false) || If(Approved, Status = "Approved", false) || If(Declined, Status = "Declined", false) || If(Canceled, Status = "Cancel", false) ) )
Note: If your data source is a SP list, when you take a try with above formula, you may face a Delegation warning issue. If the amount of your SP list records is not more than 2000, you could ignore this issue.
Please check the following GIF screenshot for more details:
Best regards,
Thanks, Got it. This is how my filter looks.
Hi @mehul_sompura ,
Have you solved your problem?
If you have solved your problem, please go ahead to click "Accept as Solution" to identify this thread has been solved.
Best regards,
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
206 | |
187 | |
70 | |
37 | |
34 |
User | Count |
---|---|
348 | |
268 | |
122 | |
78 | |
59 |