Hi,
I am trying to solve a frustrating problem whereby in a questionnaire I am getting errors because it appears that for some users the UI gets ahead of the database.
Any insight into how things work in bubble may be of help.
-
I have a primary YES/NO Question that in some circumstances show (as a condition) a secondary question.
-
The first time and answer to the primary is selected it creates a new record. (if changed is modifies the record. When the secondary answer is chosen (Yes/No) then it creates that record and in creating it it links it to the first answer record using a search in the create record script.
-
My problem is that it appears some users (and I think one who has slower broadband) are managing to create a secondary answer, which has the other fields filled in correctly, but doesnt have the Primary Answer ID in it.
i.e the script is working fine as I cannot reproduce the error for the specific question.
My only conclusion is that the secondary record is being created before the DB has created the first and therefore the search for the one field fails in the create record step, because it cannot yet see the primary record.
Of course the UI shows the secondary question first as that is a condition of the radio button on the client size.
In order to avert the issue, I have put the create and modify record workflows into a custom script, and disabled to the UI components until the custom script is completed.
?Is that right, the custom script will have finished all DB calls before returning to the main script.
The problem remains though that UI element condition still shows the secondary questions and is open briefly prior to locking it down in the script as the workflow lags the UI Condition script, and I can manage to click the radio button on the second question before my workflow temporarily disables it!
I would like to blame the user, but there appears to be a fundamental flaw in the asynchronicity of the DB and the UI.
Would love to hear from anyone who has had the same or similar problem and how to nail it!
Whilst writing this I am wondering whether to set use my UI locking state as a condition on the secondary workflow running, but then the radio button maybe checked without the record being created!! Aghhhhhhhhh