Check for an existing record (more detailed info)

I know… there are already posts with this title. Only you can find only programming code in them. I think that I am looking for a little more help. What do I have to enter where?

I have a field ‘customer number’. When I want to enter a new record, the customer number should be checked so that it is not entered twice.

In the onvalidate event do a check, or set a unique index on this field.

Thank you.
Unfortunately, this still doesn’t get me anywhere.
Is there perhaps a tutorial for this?

The solution with the index is unattractive.
I want to do this on the 1st page (multisite form with 3 pages) by checking for an existing customer number.
With the index solution this is only shown as an error when saving after the 3rd page.
It would be desirable, however, immediately after entering the new customer number, whether this is already used.

There are so many youtube video for scriptcase. Only none that checks an existing record ;(

This is a basic mysql query you can run on the On validate event of the first page.

Sometimes basics in Scriptcase are not as easy as when you program php normally.