Inquiry Primary Key (Not server Generated)

Questions and answers for designing and implementing forms in Servoy

Inquiry Primary Key (Not server Generated)

Postby joseluis.clausen » Tue May 08, 2018 9:35 pm

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,
Posts: 2
Joined: Fri Mar 09, 2018 1:58 am

Re: Inquiry Primary Key (Not server Generated)

Postby abeermann » Wed May 09, 2018 8:52 am


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)

Posts: 106
Joined: Fri Nov 26, 2010 12:46 pm

Return to Forms

Who is online

Users browsing this forum: No registered users and 2 guests