Inquiry Primary Key (Not server Generated)

Hi, i have a servoy form CRUD for a master table called “Personas” in Oracle 12c. In this table, the person_id (Primary Key) i enter for a user (i not need generate a PK with a autonumber). and i need verify that person_id not exists in the Database.

The sequence is :

1.- Click in New button
2.- foundset.newrecord()
3.- i enter the the person_id ** at this time, i need verify that this not exists in the database how can make?

thanks for your advance.
Best Regards,

Hi

Query onDatachange of form element “person_id” !?
var qb = “select person_id from personas where person_id = ?”
var result = databaseManager.getDataSetByQuery(server_name,qb,[newValue],-1)
if(result.getMaxRowIndex() > 0)
{
error…
}

regards
Albert