dialog - causes text field "trigger after update" to fail
I have debugged this trigger event line by line and the result is ..... it hates the use of "dialog". I have a need to ask for a Yes/No within the trigger event. Taking this ONE LINE out of the code allows the code to trigger (proved using alert() as first line) and all is well, but leave it in place and there's no event trigger at all.
ans := dialog(dialogtop, dialogtext + text(v), ["yes", "no"]);
I have tried:
- substituting strings for the yes/no
- starting with an undeclared variable using let....
- removing the included text(variable)
- changing predefined text into quoted text
- .....everything
...sadly, on each iteration the whole code block fails to run.
Are other users facing this problem?
Is this already documented?
Any ideas...please.
PS: If I put the code (unchanged) in a button, then it works fine.......I just don't want the button!!!
Version: Local Database (no Cloud) Mac App. v3.17.4
Thanks, as ever.
Graham
8 replies
-
SELF ANSWERED...
Sorry guys......chatGPT tells me that this is a known "gotcha" due to effectively pausing an update cycle. So in future, no dialog boxes in triggers! -
Take a look at this page. It shows you where actions happen in Ninox by default.
If your DB is stored locally,, then a dialog should always work.
I noticed that you don’t have a let in front of ans. Maybe this is why.
-
dialogue doesn't work in a trigger, but does in a button. Triggers don't have to have a user in front of the screen (zapier can add a record and the Trigger on new record will fire), but a button requires a user to click it and so is guaranteed (pretty much) to have a user present.
Regards John
-
- I will try this - and thank you all for responding.
Content aside
- Status Answered
- 2 wk agoLast active
- 8Replies
- 50Views
-
5
Following