Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5877 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

Hello,

I have a database with a text field non-unique. I would have a script that, when entering something in that field, test if there is already another record with that field value. If YES, go to the most recent record; if NOT, create a new record with the field filled with the value not found. I have try to write a script with the Find mode and the Get(FoundCount) but I am unable to succeed.¿Can anybody help me?

Thank you

Edited by Guest
Posted

I'd start by doing the entry into a global field. Set up a relationship to a self-join based on this global field and the "real" field to test for the existence of matching records (this is better than a find). Records that do match can then be "selected" using the Go to related Records script step.

The script would be something like this:

If [ not isempty( selfjoin::field ) ]

#matching records

Go to Related records [ selfjoin ]

Go to Record/request [ last ]

Else

#no records match

New Record

Set Field [ field ; gField ]

End If

This topic is 5877 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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