Thank you for sharing the Select() function! I am always been trying to find a way to have reusable code in my Power Apps without the use of components. Duplicating my code leaves me searching the whole apps if there is any code updates
It's already old fashion ^^. Consider User Define Function. Why ? Because the Select(button) will not work as expected in a ForAll(), it will do everything in the ForAll() then click n times the button.
Microsoft MVP. Power Platform form Developer and White Hat. Passion for RPA and all things LowCode, back story in shadow IT through VBA. Plays with Chrome Extensions
True, but User Defined Functions are scoped, so they cant call api's or set variables (Though I do like UDF - dev.to/wyattdave/power-apps-vba-su...) . Yep I experienced that little querk with ForAll(), but in my opnion it isnt a real loop as it can only interact with the collection its looping over (in most cases the code in the select() wouldnt work in the ForAll, apart form Patching I think). So I would use a Timer as a loop if I wanted to loop and press select.
Wow thanks for the info on the User Define Function! Will definitely try to implement that on my next Power Apps. But true its unfortunate that it can't store any variables and collection since I usually collect the data into a collection to avoid any delegation issues.
Love these! Keen to understand how you manage duplicate code when you are working across different screens? From my understanding and experience using a hidden button only works if its on the same screen - how would you call code on a different screen if you wanted to keep the code in one place?
Microsoft MVP. Power Platform form Developer and White Hat. Passion for RPA and all things LowCode, back story in shadow IT through VBA. Plays with Chrome Extensions
Thank you for sharing the Select() function! I am always been trying to find a way to have reusable code in my Power Apps without the use of components. Duplicating my code leaves me searching the whole apps if there is any code updates
It's already old fashion ^^. Consider User Define Function. Why ? Because the Select(button) will not work as expected in a ForAll(), it will do everything in the ForAll() then click n times the button.
True, but User Defined Functions are scoped, so they cant call api's or set variables (Though I do like UDF - dev.to/wyattdave/power-apps-vba-su...) . Yep I experienced that little querk with ForAll(), but in my opnion it isnt a real loop as it can only interact with the collection its looping over (in most cases the code in the select() wouldnt work in the ForAll, apart form Patching I think). So I would use a Timer as a loop if I wanted to loop and press select.
Wow thanks for the info on the User Define Function! Will definitely try to implement that on my next Power Apps. But true its unfortunate that it can't store any variables and collection since I usually collect the data into a collection to avoid any delegation issues.
I would much rather use User defined functions for reusable code.
Love these! Keen to understand how you manage duplicate code when you are working across different screens? From my understanding and experience using a hidden button only works if its on the same screen - how would you call code on a different screen if you wanted to keep the code in one place?
That is the limit of select. So you are back to duplicating code, but atleaat it's one per screen and easy to find/not miss anything
Lovely best practices !!... love the Pop-Up tips
That was truly a good one, will try to implement it as well