Hello!
I am building a PowerApp for my school and encountered a Problem that I seem to not be able to solve. Therefore I hope you can enlighten me regarding where to look for solutions.
I display a Gallery to my users with a couple of entries (different courses with times, rooms, etc.). For each entry there is also a Button through which they can enroll into the course. This Button is only visible if the person is not enrolled in the course already. I check for that with a LookUp into a Sharepoint-List. If the Person is already a participant in this course it does not show. If the Person clicks the button a Flow is triggered, that adds the person to the list.
Now I encounter a Problem. After the button was clicked it is still active until the Flow finished putting the name into the list and I refreshed the screen/gallery. But the Flow takes a couple of seconds to run and in the meantime the button is still active. If I refresh the screen before the entry was made, the button is still visible and the user could press it again (and again, and again....).
Therefore I want to disable the button after it was clicked but cannot figure out how to do it. I tried a couple of different things. The OnSelect Property of the button looks like this:
trigger_Foerderstundenanmeldung.Run(User().FullName,User().Email,ThisItem.ID) ; Refresh('Foerderstunden-Tracker')
I tried to add things like:
Self.DisplayMode = DisplayMode.Disabled
or
DisplayMode.Disabled
or
Set(DisplayMode, Displaymode.Disabled) <--- which only throws errors because it is not a variable
Is there a way to change the DisplayMode of the button that was clicked? If I use a variable for that it always changes the property for alle buttons on all rows/entries, not just the one that was clicked. I don't really know a way to just access the currently active element opposed to all of the similar ones.
Your help would be very much appreciated!