[Solved] To add Unique records to new table

Hello Thunkers!
How can we add only unique records to a table.

The image above has following textboxes. The textboxes in circled area are client data. The unique value in this textbox is GSTIN number, which is also a searchbox.
Now what I want is, if client is new, admin has to manually type the data. This data has to be stored in two tables i.e., Order Report and Client Report.
Now client report table should only add record if gstin number is unique i.e., there has to be no other records with same gstin number.

1 Like

When you say unique, do you mean to check for no duplicates?

The code that you are showing makes a list of GSTIN in Client_Report table but remember that this is done when you start the app so it will be correct for the first entry. If you try to check for the same client again then you will still find it as new.

Yes, there should be no duplications of same client in client report table.
After adding first item it does exactly you stated!

1 Like

?? No one to help me out? Or should I be more clear?

You can search the data source for the client name and use an if/else block to create a new record only if the name does not exist.

Which part do you need help with?

1 Like

Searching part is done. All I need is adding record into the table.

1 Like

You need to add a block like this

In here

This should fix the issue.

1 Like

Thank you Sir! :grinning_face_with_smiling_eyes:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.