You saved me today. I have to hides some buttons based upon user department. Each button is named the same, looks the same but does very different thing. I was manipulating the Visible parameter with variables and if statements. Switch was meant for this use! I am so happy!
@ShanesCows4 жыл бұрын
Nice Bob!
@EugeneNaumenko_Music4 жыл бұрын
Shane, i just want to say thank you for your tuttors. When i was starting with PowerApps i was watching your videos a lot. Now i really know more and it's because of you! Thanks!
@ShanesCows4 жыл бұрын
Great to hear!
@EchoDaPogi4 жыл бұрын
More Oakdale video please. Had issues on Sort / Filter / StartsWith with text box in gallery in Project Oakdale.
@ShanesCows4 жыл бұрын
Always more Oakdale! I agree. Did you check out the new class also? training.powerapps911.com/courses/create-apps-workflows-and-chatbots-for-microsoft-teams Could be fun. 😎 Also, I would love to hear more about the issues you ran into if you are willing to share. shane @powerapps91.com
@jonathanwatkins13454 жыл бұрын
Wall suggestion... Chewy mural! (I know a guy) Thanks for the great videos, Shane. Always informative!
@ShanesCows4 жыл бұрын
I like it. I actually have thoughts of creating an "employee of the month" picture of Chewy 😂
@jonathanwatkins13454 жыл бұрын
@@ShanesCows Let me know. I'm only couple hours away from Cincy and I have murals for years. thanks! Jon
@cvkealey4 жыл бұрын
I use switch a LOT for navigation purposes, but have never thought of using it in the OnSelect of a button/icon. That should help me simplify and finally finish several apps I've been putting off finishing for some time because I was dreading those complicated If statements.
@ShanesCows4 жыл бұрын
That's a great idea! Have fun :)
@ezjensen4 жыл бұрын
Great video Shane! I can see many apps that I've made I could go back and change If's to a switch.
@ShanesCows4 жыл бұрын
Awesome. 😎
@KristofferFortuna Жыл бұрын
Hi Shane, awesome video. Can you do an IfError function example?
@ShanesCows Жыл бұрын
IfError + Patch a blank value with Formula-level error management kzbin.info/www/bejne/jIbOaJ6onM6nsNk
@altino912552683 жыл бұрын
Hi Shane, thanks for another video! I've seen all the videos before that!
@pumakaua4 жыл бұрын
Awesome video as always Shane! Cheers from BurningPeru!
@ShanesCows4 жыл бұрын
Hey, thanks!
@Mx814 жыл бұрын
Hi Shane, I would love a short video about „IfError“. I just discovered how powerful this function is and maybe it will help some other users too.
@ShanesCows4 жыл бұрын
Great suggestion!
@wendymason32633 жыл бұрын
Thanks Shane, great video!
@ShanesCows3 жыл бұрын
My pleasure!
@franknielsen32194 жыл бұрын
Wauw. I keep messing up my IF´s and Switch looks to me like an ideal way to go. THX a lot. Did not know the function was there, only thought it was something in Flow. Regarding to your new room, get Chewy and Nicola in the background :D
@ShanesCows4 жыл бұрын
I like it Frank!
@mauriciopardorojas78722 жыл бұрын
Hi Shane, thanks, excellent explanation, from Colombia
@shubhangitayade816 Жыл бұрын
Hi thank you for great video. I am preparing for PL-900 exam can you please suggest where can I get practice questions?
@ShanesCows Жыл бұрын
I don’t sorry.
@SheIsObiquitous4 жыл бұрын
Short and sweet. Thanks
@ShanesCows4 жыл бұрын
Glad you liked it!
@rachelshalem3 жыл бұрын
Thank you Shane !! 😊
@ShanesCows3 жыл бұрын
You are welcome 🙏
@marrodgo4 жыл бұрын
Thank you very much for your videos!.... From Costa Rica, pura vida!
@ShanesCows4 жыл бұрын
My pleasure!
@Mrkk11034 жыл бұрын
Thanks for this. I didn't know about Switch and I think my brain works that way so I'll be trying it. This week I've been trying to use Export/Import and I can't get Import to work so learning about that would be good as would looking at SaveData and LoadData. Great videos, thank you!
@ShanesCows4 жыл бұрын
SaveData and LoadData covered here. :) kzbin.info/www/bejne/hKjFopd3bs9re80 Just remember, everytime you change the collection saveData and you can't go wrong. :)
@Mrkk11034 жыл бұрын
@@ShanesCows Thank you :-) I'll go and have a look!
@Mrkk11034 жыл бұрын
ps Sorry for troubling you. I should have spotted that!
@ash-world4 жыл бұрын
Great video Shane. so that means for an Array Switch is not same as If !
@ShanesCows4 жыл бұрын
🤔
@yourstruly97774 жыл бұрын
Is there a way we can use a third response option in the approval flow requesting the creator to make corrections and resubmit the request which triggers the flow from where it left the first time , this came as a real time scenario where the requestor doesn’t want to go through the whole approval process again and instead pick from where it left
@ShanesCows4 жыл бұрын
I usually do approvals in Power Apps, not Flow. :) kzbin.info/www/bejne/amqyY2tqmcqCd6s
@iamdeepshekhar8 ай бұрын
Hi Shane, Thank you so much for content. I've a query though : is there any online formatter or app, which can help me in formatting the complex power apps queries similar to Visual studio for C# code? (as the Out of the box, doesn't help much)
@ShanesCows8 ай бұрын
No, asking ChatGPT or Copilot for help is the best I got to offer.
@iamdeepshekhar8 ай бұрын
@@ShanesCows thank you Shane 😊
@kamranpatel44892 жыл бұрын
Hii Shane, How this can be implemented with combobox Selected items if conditions to be applied for specific valves
@IZeoClass4 жыл бұрын
LMAO. I freaking love your thumbnails Shane!
@ShanesCows4 жыл бұрын
Thanks. It is the silly little things that help I think. 😀
@clare59674 жыл бұрын
Another great video,Thanks Shane! Switch is much easier to use with multi-conditions. BTW , looking forward you can make a video about GroupBy function, Pleeeeeese!
@ShanesCows4 жыл бұрын
Thanks for the idea! Added to my ever growing list.
@mikepasin3728 ай бұрын
Hi Shane, can I use switch to conditionally validate a dropdown list based on the select of a value in another dropdown? For example, if dropdown1 selected text is 'A', dropdown2 will have [1, 2, 3, 4], but if dropdown1 selected text is 'B', dropdown2 will have [5, 6, 7, 8], etc. Cheers.
@acm-yo4mp Жыл бұрын
Hi Shane, can use if condition like "If(DropDown.DisplayMode.Edit = DisplayMode.Edit,...)?
@ShanesCows Жыл бұрын
Not Exactly. It would be If(DropDown.DisplayMode = DisplayMode.Edit, "Yes", "No")
@NKBobcat4 жыл бұрын
For me it's like If(need is simple, Use If, Switch)
@ShanesCows4 жыл бұрын
😂
@leetyler31024 жыл бұрын
not sure if it's even possible but it's something thats driving me mad: can you lock the position of controls so they cannot move? example: a form you want to hide a control under criteria but you don't want to move the other controls because the form is laid out in a specific way.
@ShanesCows4 жыл бұрын
Nope. It has been on the wish list for a long time.
@Danielx643 жыл бұрын
Hi Shame, Great video. Just a question, while this is for PowerApps, I see that Power Automate also have the same thing. Would you happen to know how much of a performance difference it would be going from using 'if' to 'switch' in Power Automate? Thank you :)
@ShanesCows3 жыл бұрын
I don't know. I bet it depends on the amount of evaluations and such.
@davidmckenzie18892 жыл бұрын
In other languages (I'm recalling VBA, but that might be my memory playing tricks) SWITCH will evaluate the first bit, e.g. Dropdown1.Selected.Value once, whereas IF will evaluate it for every [attempted] match. Would make more of a difference if what you are comparing is complex (say, a concatenation of several dropdown selections), however even if this takes 1ms to evaluate and there are 500 options, IF would only take a maximum of 1/2 a second more to match with the last option and less if you match with one of the first 499 options since it will stop evaluating when if finds a match. Caveat: I don't know if this is how it would work but it seems reasonable. Maybe MS have coded this to be 'cleverer' so it is more efficient.
@simmyjer2 жыл бұрын
Do nested switch statements work?
@ShanesCows2 жыл бұрын
I had to go try but Yes, you can. Weird but it works.
@simmyjer2 жыл бұрын
@@ShanesCows thanks Shane :)
@thewanderingcouple8378 Жыл бұрын
Hi my form's status coloumn has three options 1. New, 2, work in progress 3. Completed. When user will choose any field from request category the status field default value will be 1.New. If user put email Id in a diffrent field (column type person or group)then Status will be default 2.work in progress Finally when user will select ID created option Yes then status column default value should be completed. How to make this please help me.. whatever I learnt I learnt by you. Please show me an example how to write the formula for this scenario
@metehanb19972 жыл бұрын
Hello all, thank you for the great video! I still have one question: I have built a search app and would like to display the thumbnails depending on the document type. So, if it's a Word document, I want the thumbnail to be a Word icon. If it's an Excel file, an Excel icon and if it's a folder, a folder icon etc. I've tried this with nested If conditions and the function Right(ThisItem.'File name with extension', 4) = "docx" 'Word File') but unfortunately without success.... I am getting desperate. I wanted to build the function as follows: If(ThisItem.IsFolder, 'Folder File', Right(ThisItem.'File name with extension', 4) = "docx" 'Word File' etc.... By my logic, I would have thought this would work. How do I make it work? With which function is it possible? Thank you! :) Mete
@gerfer62614 жыл бұрын
Good timing for SWITCH red 2 blue, but @the movement it is “If”-thanks
@ShanesCows4 жыл бұрын
Happy to help
@kamozzi13 жыл бұрын
Thanks for the video Shane, Quick question, how would we go about using switch/if when we have multiple controls in action. i.e. if i have 20 toggles and if any of them is set to No, display a text input otherwise hide. please advise?
@davidmckenzie18892 жыл бұрын
Kamran, The easiest way to do this would be to use AND() - or the 'shorthand' version && - to return a TRUE or FALSE on the text input visible property. Something like: AND(Toggle1.Value, Toggle2.Value, Toggle3.Value, Toggle4.Value, Toggle5.Value) will return TRUE only if all 5 toggles are TRUE/Yes. For your particular example you would wrap this in a NOT() to have FALSE when all toggles are TRUE, i.e. text input not visible when all toggles are TRUE.
@raouleliasmiraglia1483 жыл бұрын
Hi Shane, first of all thank you for all these great videos! I have a question regarding the Switch function... I want to tell Powerapps, that If the number of Label1 is in the range between 0 and 1 then this very number should be displayed in red. If the number of Label 1 is in the range between 1 and 2, then it should be displayed green....etc... And somehow I can only tell Powerapps that If the number matches 1 then it should display in red. (so no range...) Is there a possibility, that I might have overseen? Greetings from Switzerland
@ShanesCows3 жыл бұрын
I wouldn't use Switch, I would use If. If(value < 1, red, value >= 1 And value
@raouleliasmiraglia1483 жыл бұрын
@@ShanesCows Thank you very much!
@lk43wz3 жыл бұрын
Hi Shane, thanks for this useful video. However, I'm still trying to figure out how to use if/switch to identify a field in my gallery which hardware are too old (older than 3 years) and need to be replaced otherwise they're good for keep using. This is from a text property of the body in the HardwareGallery If(Value(ThisItem.AgeColumn)>3),Red,Green; Any advise is appreciated. Thank you Kel
@mtamitolanga4 жыл бұрын
Hi Shane .. switch is the simplified version of if 😁 thank you
@ShanesCows4 жыл бұрын
No problem 👍
@zanrleonardo4 жыл бұрын
Make a model drive vídeos Shane
@ShanesCows4 жыл бұрын
Not on my immediate plans, we just don't have any customer demand for them. 😑
@TheToni21234 жыл бұрын
thx again
@ShanesCows4 жыл бұрын
You're welcome!
@lucas869994 жыл бұрын
👍
@ShanesCows4 жыл бұрын
🙏
@chap666ish4 жыл бұрын
In the popular vote Switch trumps If. Sounds political but it's not.