fileman922 Posted October 23, 2015 Posted October 23, 2015 Hello , i have a invoice solution and i want to prevent duplicate the items products on the same invoice portal. for example if i have a product called " 2525 " and then im trying to add the same "2525" shows me a custom dialog to stop . i use global fields with a button script to add items to the portal . please let me know how to resolve this, I've been trying many ways with no luck thank you
Kris M Posted October 23, 2015 Posted October 23, 2015 (edited) You should try to leverage the field level validation settings to handle this condition. If you have built a proper invoicing solution then you should have an invoice line items table that knits together invoice id, product ids, quantities and the like. the invoice line items table is the right place to put the unique, validate always, and don't allow user to override.validation. I would create an auto enter calculation that concatenates the invoice id and the product id and drop the validation on that. This method means that anywhere the invoice line item::product id field is expressed on a layout it will be validated if the value is changed. Another method that not safe for your data because its tied to the UI is to use an onObjectValidate script trigger on the layout object you want to control. Because the OnObjectValidate script trigger is a PRE event trigger you can cancel the event that triggers the trigger by returning False with the Exit script step i.e. Exit[False] http://www.soliantconsulting.com/blog/2015/05/filemaker-14-script-triggers Edited October 23, 2015 by Kris M
Agentshevy Posted November 22, 2015 Posted November 22, 2015 Checkout this thread... Sample files are there too http://fmforums.com/topic/98459-loop-script-to-update-portal-records/#comment-447649
Recommended Posts
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