cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RafaelISCTEEP97
Helper I
Helper I

Filter radio button with another radio button

Hi guys 🙂

 

I need help!!

 

Can i filter one radio button with another radio button?

 

Like the image:

 

RafaelISCTEEP97_0-1646768593626.png

"Partes do objeto" set the options on "Tipos de defeito", filtering the radio buttons and showing the options linked with the first variable

 

thanks guys

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi  @RafaelISCTEEP97   do you have a relationship between the two choice sets somewhere, for example how is 'Tipos de defeito' related to 'Partes do objecto' ? Choices('NOTA BAY SALTO / SE BAURU'.'Tipos de defeito') is the table you need to filter.

 

Consider the following:

  • Radio1 Items = Choices('NOTA BAY SALTO / SE BAURU'.'Partes do objeto') //these are yours
  • Radio2 Items = Choices('NOTA BAY SALTO / SE BAURU'.'Tipos de defeito') //these are yours

Simulating the Choice columns as tables:

  • Radio1 Items = ["Sistema de superisao e Monitoramento","Sistema ...", "Gas ...", "Olea ..."]
  • Radio1 OnChange = Set(
    _CheckString,
    Switch(
    Radio1.Selected.Value,
    "Sistema de superisao e Monitoramento",
    ["Vazamento", "Mas condloes ...", "Operacao..."],
    "Gas ...",
    ["Vazamento","Componente ..."],
    ["Vazamento","Componente ...", "Mas condloes ...", "Operacao..."]
    )
    )
  • Radio2 Items = Filter(["Vazamento","Componente ...", "Mas condloes ...", "Operacao..."], Value in _CheckString)

Result

Peek 2022-03-09 16-02.gif

 

will this work for you?

R

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.

View solution in original post

9 REPLIES 9
rubin_boer
Super User
Super User

hi @RafaelISCTEEP97 yes you can. figure out how to filter your radio buttons first and then apply it.

 

As an example: 

Radio1 have following items [1,2,3,4]

Radio2 have [10,11,12,13,14]

condition: You want to show all items for Radio2 which is more than 4 times the selected Radio1 value 

 

Radio2 Items = Filter([10,11,12,13,14], Value > Radio1.Selected.Value * 4)

 

Result 

Peek 2022-03-08 22-34.gif

 

 

filtering all the radio buttons can be done this way. 

 

Hope it helps,

R

 

 

 

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.
RafaelISCTEEP97
Helper I
Helper I

Hi @rubin_boer 

 

Thanks for the answer 🙂

 

In my Radio2 Itens a have:  Choices('NOTA BAY SALTO / SE BAURU'.'Tipos de defeito')

RafaelISCTEEP97_0-1646823230700.png

because in my app i have one list of variables

 

is there any way make a selection like this?

The option "Sistema de Supervisão e Monitoramento" in Radio1 give me the 3 options in Radio2: "Vazamento","Más condições de operação" and "Operação incorreta".

 

RafaelISCTEEP97_2-1646823646840.png

 

In this case i set the options with variables

 

rubin_boer
Super User
Super User

hi  @RafaelISCTEEP97   do you have a relationship between the two choice sets somewhere, for example how is 'Tipos de defeito' related to 'Partes do objecto' ? Choices('NOTA BAY SALTO / SE BAURU'.'Tipos de defeito') is the table you need to filter.

 

Consider the following:

  • Radio1 Items = Choices('NOTA BAY SALTO / SE BAURU'.'Partes do objeto') //these are yours
  • Radio2 Items = Choices('NOTA BAY SALTO / SE BAURU'.'Tipos de defeito') //these are yours

Simulating the Choice columns as tables:

  • Radio1 Items = ["Sistema de superisao e Monitoramento","Sistema ...", "Gas ...", "Olea ..."]
  • Radio1 OnChange = Set(
    _CheckString,
    Switch(
    Radio1.Selected.Value,
    "Sistema de superisao e Monitoramento",
    ["Vazamento", "Mas condloes ...", "Operacao..."],
    "Gas ...",
    ["Vazamento","Componente ..."],
    ["Vazamento","Componente ...", "Mas condloes ...", "Operacao..."]
    )
    )
  • Radio2 Items = Filter(["Vazamento","Componente ...", "Mas condloes ...", "Operacao..."], Value in _CheckString)

Result

Peek 2022-03-09 16-02.gif

 

will this work for you?

R

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.
RafaelISCTEEP97
Helper I
Helper I

Thanks @rubin_boer 

 

This work for me 😄

 

rubin_boer
Super User
Super User

hi @RafaelISCTEEP97 its a variable being used for the evaluation. 

 

Consider

Set(_CheckString,
Switch(
Radio1.Selected.Value,
"Sistema de superisao e Monitoramento",
["Vazamento", "Mas condloes ...", "Operacao..."],
"Gas ...",
["Vazamento","Componente ..."],
["Vazamento","Componente ...", "Mas condloes ...", "Operacao..."]
)
)

when the radio1 (Radio1.Selected.Valuechanges value it is evaluated, when it is "Sistema de superisao e Monitoramento" the set the value of _CheckString to this table ["Vazamento", "Mas condloes ...", "Operacao..."].

 

Every time the value changes it gives a new table value to _CheckString which you then use to filter the radio2.

 

Hope that helps,

R

 

hey there if you liked the post give it a thumbs up, and if it solved your question please accept it as a solution.
RafaelISCTEEP97
Helper I
Helper I

@rubin_boer  Thanks!!

 

You are the BEST 😁

RafaelISCTEEP97
Helper I
Helper I

Hi @rubin_boer  , how r u?

 

I have a new question...

Can i do this same filter but using a text?

The text set the radio button 1 options, and the radio button 1 options set the radio button 2 options??

 

Like this (using a example with type of movies)

 

TEXT: MOVIE

RADIO BUTTON 1: DRAMA, ACTION, HORROR, ROMANCE

RADIO BUTTON 2: NAME OF MOVIE 1, NAME OF MOVIE 2, NAME OF MOVIE 3, ...

 

When a put the name of movie the option set the type of movie and returns the names

RafaelISCTEEP97
Helper I
Helper I

Forget the question above!!

 

When a use sharepoint list my variables like "Parte do Objeto" and "Tipo de Avaria" are set with DataCardValue9, which determines the type of equipment...

 

The problem is: The radio button doesnt appear =/

 

Can you have the solution? @rubin_boer 

 

RafaelISCTEEP97_0-1647001590320.png

 

RafaelISCTEEP97_1-1647001607107.png

 

fyi

The field "Tipo do Objeto"

RafaelISCTEEP97_1-1647002624899.png

have a database, i dont know if this influence in filters

 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,111)