I have a switch component on Connect With a Tutor tab named Cancel Request. This component is connected to Student Cancels Request column on the spreadsheet.
This component will be visible when student email is not empty. And when user switches it, then the Student Cancels Request will become true. And, when Student Cancels Request data is true, then the tutoring request will not be visible on this page.
When I switch this component, the tutoring request becomes invisible, but the data on the Google sheet does not turn to TRUE.
This is strange, because the data does not get updated, but the tutoring request dissappears because of the visibility condition based on Student Cancels Request data. How can this happen without google sheet data getting updated?
I wonder if the app is getting confused because the filter is making the record disappear right away. Does the value get set correctly in the data tab, but just not the sheet? I just tried out your app and it seems to be functioning correctly.
The value does not get set in the data tab as well. I think your guess is right. The filter makes the record dissappear right away, and therefore the app is getting confused. But, why does it dissappear when the data is not updated, meaning shouldnt glideapp check the google sheet data before acting on the logic? Is there an internal logic that works here without glide app checking the google sheet data? It works fine on the student app, but the problem is the tutoring request does not disappear from the tutor app, because the tutor app visibility condition for the request is dependend on Student Cancels Request becoming true among another conditions. The URL for the tutor app is tutorapp.glideapp.io.
Wish I had answers for you. You could try making it an editable record instead of just the switch component on the screen. That way the student would have to edit the request and submit, which may make the update work.
Adding an edit entry was not user-friendly.
I finally solved it through this way:
Have a column Finished Complete, which will decide if a session is no longer required on the students and tutors dashboard.
When student cancels a request or tutor cancels a request, or a tutor completes a session, show a message indicating the above and a Back choice component which is connected to Finished Complete column.
The visibility condition for the message and Back choice component is that Finished Complete is not TRUE.
When the Back choice component is switched by the student or tutor, the message and the switch component dissappears because of the visibility condition. But, the Finished Complete is not updated due to the bug.
So, I created a ARRAYFORMULA function, which makes the Finish Complete to be equal to 1, if student cancels request, or tutor cancels request, or tutor completes a session is TRUE.
=ARRAYFORMULA(IF(LEN(E2:E)=0,"",(J2:J+L2:L+M2:M)))
So, the Finished Complete column gets updated, and it takes a few minutes for the update to be visible on the glideapp.
The request dissappears from student app and tutor app. Sucess!
The Bug still remains. Hope the glide team can look into it and fix it.
That’s exactly the bug, which you have displayed very accurately through your video.
The reason why I think glideapps has done like this is due to the slight time delay in data going to google sheet and then glide app later detecting it. So, the user may not be able to see any action when clicking on the switch component immediately. So, glideapps would have decided to do an internal logic, rather than check it on google sheets. But, as you pointed out, it creates problems for the app. Hope glide team can respond to this.