Dialog testing

Ninox Profile

I am playing around with the dialog() function to figure out how it works. I created a little app that can be used to give a quiz, or take a survey. Right now it just records results into a text field, but it should be something else. This is just so I can play around.

Screen Shot 2018-10-15 at 5.23.18 PM

When you click the button on the Dialog Test form, a dialog() will pop up for each Question.

Screen Shot 2018-10-15 at 5.37.19 PM

Screen Shot 2018-10-15 at 5.38.10 PM

This is the button code on the Dialog Test form:

let Main := this;
for i in Question.Instructions do
let Questions := text(unique(Question.[i]));
let L := length(Questions);
let QP := 112;
if L > 80 then QP := L + 80 end;
let QA := rpad(Questions, QP, " ") + rpad("-", 80, "-") + " ";
for ii in Question[Instructions = i].Choices.AnswerID do
let A := text(unique(Question[Instructions = i].Choices[AnswerID = ii].Answer));
L := length(A);
if L > 80 then QP := L + 80 end;
QA := QA + rpad(text(unique(ii)) + ": " + A, QP, " ")
let Answer := text(Question.Choices.AnswerID);
let response := dialog(text(unique(Question[Instructions = i].Question)), QA, Question[Instructions = i].Choices.AnswerID);
Text := Text + response


A few things I have noticed so far.

Choices for answers should be limited to 10. 11 will fit, but doesn't look quite right. 12 will be over the edge of the dialog window.

The iPhone version of Ninox does not display dialog() the same way the OSX or web version of the app does. My code doesn't look right on the iPhone. I assume it is the same on the iPad, but I haven't tried it yet.



I also noticed that some code does not work if the DB is hosted local. This is the code I use to automagicly create the AnswerID in the Choices record. It will work if the DB is on Ninox Cloud, but will not work if the DB is local or on iCloud.

AnswerID := text(number(max(Question.Choices.AnswerID)) + 1)

Is there anything I can do to get it to work when the DB is not hosted on Ninox Cloud?

Ninox Profile

iPad app dialog() looks the same as web and mac app. Only the iPhone dialog() is formated differently.

Ninox Profile

Thanks for the update.. Interesting about the different behavior based on platform.