Is there a way to enforce the required fields so a record row will not be added unless all required fields are completed?
Hi, that is not possible, as records are created on instance.
Though we have this thought already on the change request list.
Best regards, Alex
This would be great if it could be added. Because now people can add records without filling all required fields. And that's why we make them required, because they need to be filled in otherwise there are later on issues.
Alternatively you can use some logig steps (this is not the same but you 'll get warning), for example
let t := this;
if RequiredField = null then
let check := dialog("Attention", "This Field can not be empty bla bla bla", ["OK", "Delete"]);
if check = "Delete" then delete this end
*If you press "Delete" will delete the record.
And this dialog works? I don't get this dialog at record or field update. Or am I doing it wrong (you are talking with a beginner here ;-))?
If I replace what's between the if statement with an alert, the alert will pop-up.
yes it works, if you put the code behind a button.
When done with the creation or modification of a record, push the (e.g. 'Save') button and:
Ok, I understand. It's working now :-)
But if I'm correct, in theory you are not really saving it when pressing the button. It's more like a check. So there is still a way of adding records with empty RequiredFields.
So not really what I was hoping to do but it was a good learning on triggers :-)
That is correct.. Ninox Partner Maarten Thiebou presented an interesting "hack"... It is a way to use html / css to "hide" the "X" in the upper left, and add a button to save/close.. where you can put the logic. That said.. users can still move off the table, or simply close the application and add invalid data. :(
crea un campo formula e scrivi al suo interno:
Vedrai scomparire la "X" per chiudere il modulo.
Crea successivamente un tasto "Salva e chiudi" per fare tutti i controlli prima di uscire
Could the formula solution provided by Antonello be used globally? And used to style the entire database?
Wondering if that would cause issues with the speed of the database?