web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Probleme whith swhich
Power Apps
Answered

Probleme whith swhich

(0) ShareShare
ReportReport
Posted on by 109

I try to make many actions with conditions :

 

 

 

Switch(Radio1.Selected.Value = "Site";
 Set(VarSite;"true");;
 Filter(
 T_Inventaire;Site = SelSite.Selected.Site
 );

 Radio1.Selected.Value = "Unité";
 Set(VarUnit;"true");;
 Filter(
 T_Inventaire;UNITE = SelUnit.Selected.UNITE
 );
 
 T_Inventaire;
)


the syntax have a problem (see attachment) Could you tell me why ?? Thanks

 

 

the syntax have a problem (see attachment) Could you tell me why ?? Thanks

Untitled.gif
I have the same question (0)
  • vikulkar Profile Picture
    Microsoft Employee on at

     

     

    Hello @Kervin ,

     

    One sample way of using Switch is:

     

    Switch( Radio1.Value, 20, "Result1", 10, "Result2", 0, "Result3", "DefaultResult" )

     

    Please take a look at the below video which shows how and when to use switch statement.

    https://www.youtube.com/watch?v=cVYpdnyMy8E

     

    Thanks and Regards,

       Vikas

  • Kervin Profile Picture
    109 on at

    my problem is that i want more than 1 action by selected value :

    Switch(Radio1.Selected.Value = "Site"; Action 1 : Set(VarSite;"true");; Action 2 : Filter( T_Inventaire;Site = SelSite.Selected.Site ); Radio1.Selected.Value = "Unité"; Set(VarUnit;"true");; Filter( T_Inventaire;UNITE = SelUnit.Selected.UNITE ); T_Inventaire; )

     

  • Kervin Profile Picture
    109 on at

    I want do this

     

    code.jpg

     

  • vikulkar Profile Picture
    Microsoft Employee on at

     

    @Kervin 

    Can you try using it this way?

    In my case:

    //Action1 is Set(x,"Huli")

    //Action2 is Set(y,"Baba")

     

    // Switch(Radio1.Selected.Value=1,Set(x,"VK");Set(y,"Kulkarni"),Radio1.Selected.Value=2,Set(x,"Baba");Set(y,"Huli")) 

  • Verified answer
    Kervin Profile Picture
    109 on at

    So ihave to make 2 conditions .

    1 for the hole "Action 1"

    2 for the hole "Action 2"

    ... I wil do that 

    Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard