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

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

Recommended Posts

  • Newbies
Posted

I have a button that, when clicked, it finds a record based on the contents of the "names" field. If that record exists, it goes to that record and the script ends there. If that record does not exist, I would like it to then create a new record. I would like this all to be done with the one click of the button. I am an extreme novice and any help would be greatly appreciated.

Thank you!

Posted

You can try this:

Enter Find Mode [pause ]

Set Variable [ $name; Value:table::clientName ]

Set Error Capture [ On ]

Perform Find [ ]

If [ not Get ( FoundCount ) ]

New Record/Request

Set Field [ table::clientName; $name ]

End If

This allows the User to perform a regular find on the name, stores that request into a variable, performs the find and, if it can't find that name, creates a new record. I would suggest asking the User to verify if they want a new record. I would also caution that if something is misspelled, you can get same customer added twice.

It might work better to include something truly unique about them, such as phone number.

  • Newbies
Posted

I'll give it a try. Thanks.

You can try this:

Enter Find Mode [pause ]

Set Variable [ $name; Value:table::clientName ]

Set Error Capture [ On ]

Perform Find [ ]

If [ not Get ( FoundCount ) ]

New Record/Request

Set Field [ table::clientName; $name ]

End If

This allows the User to perform a regular find on the name, stores that request into a variable, performs the find and, if it can't find that name, creates a new record. I would suggest asking the User to verify if they want a new record. I would also caution that if something is misspelled, you can get same customer added twice.

It might work better to include something truly unique about them, such as phone number.

This topic is 4937 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.