Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Best way of checking if a record exists in table based on person name?

rambo81Apr 12 2016 — edited Apr 13 2016

Hi

On a new form in apex when a user enters a participants name I want it to check if this person has already been registered already in the database.

The values I am using is their firstname, surname and national insurance number(which is unique) and have created a button called 'Check Records' which runs a dynamic action on event click with an action of set value with the following SQL

select firstname ||' ' || lastname ||' ' || ninumber d, userid r from clientsinfo

where

UPPER(firstname) = UPPER(:P1_firstnames)

AND

UPPER(lastname) = UPPER(:P1_lastname)

AND

UPPER(ninumber) = UPPER(:P1_ninumber)

With a page item of submit set to P1_lastname and in affected elements it references the select list P1_USERSFOUND which would display the list of users found that already have been registered.

However this is not working correctly yet when you enter the firstname and surname and then click on the 'check records' button the P1_USERSFOUND is blank even though my sample record already exists in the table.

What am I missing and is this the best way of achieving the functionality I am looking for?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2016
Added on Apr 12 2016
6 comments
2,550 views