July 31, 201114 yr Hi All, I want to create an input layout as I am fed up of getting blank records in the database but am somewhat stumped how to do this. The database is a standard invoice system with with four tables linked, Invoice, Clients, Products and Line_Items. While it would be easy enough to put a Commit button on the invoice and if the record is not committed, delete the record and reset the Invoice number sequence but what about the line_items which will still persist and resetting the line_items record numbers. Any pointers or reading material you could direct me to would be appreciated.
July 31, 201114 yr If a new record is not yet committed, you can cancel it by reverting. This will also cancel child records created in a portal. Rather than resetting the serial number (which could produce duplicates in a multi-user scenario), set the field to generate 'On commit' instead of 'On creation'.
July 31, 201114 yr Out of creation sequence, yes. Not sure what harm is in that. You could also have a Committed timestamp field to satisfy the auditors.
August 1, 201114 yr The folks that complain about missing invoice numbers will not accept out-of-order numbers either.
August 1, 201114 yr If so, they are looking at a more complex solution - such as entering the invoice data into globals and having a script post the "real" invoice.
August 1, 201114 yr Author Unfortunately our auditors are one of those that will not accept "Missing Numbers" which is why I can not allow the deletion of records to get rid of the blanks. However I see nothing wrong with out-of-order as the invoice is dated not timestamped and while the line_items are timestamped as long as there is a sequence that can be followed I think we can get away with it. Either way how do I create a trigger for On Commit. Should this be a Layout Trigger as I have no idea what field they are in when they abandon the creation, (they may have put the Client data and order number in but no Line_Items etc).
August 1, 201114 yr No trigger is necessary - the setting is found in the serial number field's auto-enter options. See also: http://fmforums.com/forum/topic/66874-commit-or-rollback/page__p__317187#entry317187
August 1, 201114 yr Author No trigger is necessary - the setting is found in the serial number field's auto-enter options. See also: http://fmforums.com/...187#entry317187 One will be required because the user may just hit an area outside a field and therefore commit the record creating the invoice. I would therefore need to put up a dialog asking if the want to commit or to revert the record.
August 1, 201114 yr One will be required because the user may just hit an area outside a field and therefore commit the record creating the invoice. Had you read the post I linked to, you'd know that you can disable this in the layout setup. If you hate your users enough, you could leave it at that; otherwise keep on reading.
Create an account or sign in to comment