An alternative to the Input Dialog

Ninox Profile

I know there isn't an Input Dialog in Ninox - yet ;-), but when it is available I have to wonder if it will have the flexibility of a Form. After I posted in the field with some ranking property thread, I was very interested in finding a way to get the input from something like an Input Dialog and getting rid of the RankChk field. This is what I came up with:

MainScreen

SelectedForm

UIInteraction

I've only tested this with the Number, Text and Date fields, but I can't see any reason why it wouldn't work with all of the available fields. Here is the code for the Update Date button:

 

let numThisId := number(this.Id);
let dteThisDate := this.Date;
record(frmGetDate,1).(tblTestId := numThisId);
record(frmGetDate,1).(Date := dteThisDate);
popupRecord(record(frmGetDate,1))

 

This copies the main table record Id to the Form Table and initializes the Date field. Here is the code for the Confirm button on the Form:

 

let dteTblTestDate := record(tblTest,tblTestId).Date;
let dteThisDate := this.Date;
if dteTblTestDate != dteThisDate then
record(tblTest,tblTestId).(Date := dteThisDate)
end;
closeRecord()

 

This copies the new Date back to the main table. The Cancel button code is just closeRecord(). The Form has only one record and two user defined fields; one for the main table Id and the other for the Date. By using this method, I was able to delete the RankChk field.

Reply