Oyseka Posted July 31, 2011 Posted July 31, 2011 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.
comment Posted July 31, 2011 Posted July 31, 2011 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'.
Vaughan Posted July 31, 2011 Posted July 31, 2011 The onCommit options allows for out-of-sequence serial numbers to be generated.
comment Posted July 31, 2011 Posted July 31, 2011 Out of creation sequence, yes. Not sure what harm is in that. You could also have a Committed timestamp field to satisfy the auditors.
Vaughan Posted August 1, 2011 Posted August 1, 2011 The folks that complain about missing invoice numbers will not accept out-of-order numbers either.
comment Posted August 1, 2011 Posted August 1, 2011 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.
Oyseka Posted August 1, 2011 Author Posted August 1, 2011 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).
comment Posted August 1, 2011 Posted August 1, 2011 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
Oyseka Posted August 1, 2011 Author Posted August 1, 2011 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.
comment Posted August 1, 2011 Posted August 1, 2011 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.
Oyseka Posted August 3, 2011 Author Posted August 3, 2011 Sorry Comment, Yes I have now read the post and it answers my question.
Recommended Posts
This topic is 4861 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now