October 16, 200520 yr Newbies I have set up a Orders Tracking database which enables vendors to create an modify records on both files (Orders, Items)until a field (Invoice Nr)is filled up, thus locking that particular record and the Items in the portal. Vendors are still able to create new records and modify those that have an empty field "Invoice Nr". So far so good, if not for the fact that they can create new records in the portal. Is there something like a Portal Property that lets you create new records conditionally ?
October 16, 200520 yr You can create portals conditionally via script. To stop portal records from being created when user clicks on the "open" portal row, set up your relationship by making sure that the option for "Allow creation of related records via this relationship" is UNCHECKED. This will allow you to set up a conditional script for creating the related records. if [isempty (Invoice Nr)] Custom Dialog ["You must first..."] //here you can give the user the option toinput the required fields using the "input Fiedl" tab in the custom dialog window. If you use the nput field, you will have to use another if statement to check what the user decided to do, ie, if (get (lastmessagechoice) = 2 exit script else perform another script step etc... Exit script [] Else Go to Layout [] New record Set Field [invoiceID; get (scriptparameter)] Go to related record Go to portal row [last] End if
Create an account or sign in to comment