Jump to content
Sign in to follow this  
lgaray

Prevent duplicate records in a portal

Recommended Posts

Hello:

I would like to know how to prevent duplicate records in a portal. For example, if I enter an item#, and in the next row I enter the same item#, how do I copy the data from the current row into the previous row?

Thanks,

Larisa.

Share this post


Link to post
Share on other sites

I would probably enter the new row data into global fields rather than directly into the portal. With the press of an "Enter" button to submit the data, the script triggered could check for to see if that item number already existed. -bd

Share this post


Link to post
Share on other sites

You can also do this with a technique that ensures that two fields together are never the same. Given what you're doing, for instance, you probably have an invoice file and a products file, each of which has an ID field, Invoice_ID and Product_ID.

Create a field in Invoice_LI that is called something like Invoice_ID|Product_ID that is set to be an auto enter calculation of Invoice_ID & Product_ID. You want to make sure that this field is unique for all records in the Invoice_LI database. Click on the Validation tab for this fields options and click on the Is Unique field, with perhaps strict and custom message options also. This should work if you have the portal in Invoices that looks into Invoice_LI allow the creation of related records, since as soon as you enter a line item with a product id, a record would be created in the line items file that fills in botht the invoice id from the current invoice and therefore the Invoice_ID|Product_ID field with the two numbers.

You might have to refine this a bit, but experiment with this idea. I know I've used something similar, but I remember that I had to tweak the idea before it worked.

Chuck

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Christoph 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.