Two Serious Problems... Required Fields & Trigger on new record/update
I just realized there are two serious problems that might be deal-breakers for my business.
1. Required fields don't seem too required. That is to say, I can close a record and it saves (because it enters the database on creation) but it can be closed without Required fields actually being filled out. How is that Required? How does everyone else handle this?
2. I can't seem to get scripts running on a table's Trigger on new record, or Trigger on update. Do these not actually do anything?
(I'm on web.)
18 replies
-
Kent Signorini
What works for me is using the trigger after hide of the tabelement. What I do is create a tabelement, drag it to the first place of the fields list. (When you use the "Edit Fields" command)
Now you can even use a different backgroundcolor for your form and/or change the title.
Then I select the Tab element and under more options you find the trigger after hide.
There you can program to check if required fields are filled. e.g.:
let me := this;
if not 'Booking#' then
let responce := dialog("Warning", "Field Booking# is still empty! Delete this record?", ["Yes", "No"]);
if responce = "Yes" then
delete me
else
if responce = "No" then popupRecord(me) end
end
endSteven
-
here are some functions that are not supported on triggers ("on create" and "after update" in the table) in the web browser version but only in buttons and on the "Trigger after open" in the database options:
- alert()
- openTable()
- popupRecord()
- dialog()
In the Ninox Apps the functions are supported
-
Food for thought.
Another way to do this is to take control using Dashboards. You can create a dashboard that users use to input data then before you create the new record you can check for any required fields.
Dashboards can also be used for security purposes since users never get access to the raw tables you have added a layer of protection.
I think it is better in a multi-user environment to NOT let users access the raw data tables directly.
-
Kent Signorini said:
So I'm trying to write some code to do this for multiple fields.Take a look at this post and see how you can create it without using a bunch of if statements. Those get crazy if you need to check more than three.
-
said:
Do you know of anywhere that I can learn about how to do this better please?Do a search for Ninox Dashboards on the web and there are video links from Ninox and Nioxius. Though, now if you are on public/private cloud you would use pages instead of creating a table, add a record, then a new form view, etc.
Content aside
- Status Answered
- 10 mths agoLast active
- 18Replies
- 248Views
-
5
Following