cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mehul_sompura
Level: Powered On

select multple buttons

Capture1.PNG

 

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?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: select multple buttons

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:4.JPG

 

5.JPG

 

6.JPG

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:Test.gif

 

 

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.

View solution in original post

Community Support Team
Community Support Team

Re: select multple buttons

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,

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.

View solution in original post

4 REPLIES 4
seadude
Level 10

Re: select multple buttons

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:

  • OnSelect property of Submitted button:
    • If(
          IsBlank(varSubmitted), 
          Set(varSubmitted, btn_submitted.Text), 
          Set(varSubmitted, Blank()
      )
  • Fill property of Submitted button: If(varSubmitted = btn_submitted.Text, Red, White)
  • Color property of Submitted button: If(varSubmitted = btn_submitted.Text, Black, White)
  • Test that out then repeat for all buttons.

Setup correct filtering:

  • Without seeing your Filter logic, I'll take a guess here. You can adapt it for your needs.
  • Filter(colOutOfOffice, Or(status = varSubmitted, status = varApproved))
  • I've only lightly tested this. You'll need to adjust for your needs.

Maybe this helps you! Let us know!

Take care

Community Support Team
Community Support Team

Re: select multple buttons

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:4.JPG

 

5.JPG

 

6.JPG

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:Test.gif

 

 

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.

View solution in original post

mehul_sompura
Level: Powered On

Re: select multple buttons

Thanks, Got it. This is how my filter looks.

Capture3.PNG

Community Support Team
Community Support Team

Re: select multple buttons

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,

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.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,059)