Hi @s44,
The following changes should do the trick. The code below assumes that you are using Dataverse.
(1) Change radio button Items property to
["Actif"; "Inactif"]
(2) Change the Items property of your gallery to:
With(
{
//Map the selected value to the correct choice list option
//In Dataverse your default Status column is a local choice list within that table
wStatut: Switch(
Radio2.Selected.Value;
"Actif";
'Statut (JOURNAL_BY_PASS)'.Actif;
"Inactif";
'Statut (JOURNAL_BY_PASS)'.Inactif
)
};
Filter(
'JOURNAL_BY_PASS';
IsBlank(Radio2.Selected) || Statut = wStatut
)
)
Alternatively, to avoid the choice list mapping you could use a Dropdown control with the following Items property:
Choices('JOURNAL_BY_PASS'.Statut)
(You can allow empty selections by setting 'AllowEmptySelection' to true)
Your gallery items property would be:
Filter(
'JOURNAL_BY_PASS';
IsBlank(Dropdown.Selected) || Statut = Dropdown.Selected.Value
)
If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.
Thanks!