If you encounter the "This app ran into a problem" error in Power Apps, try separating each line of code into separate buttons and use the Select function to fire the OnSelect event. This should fix the issue.
Login now to access my digest by 365.Training