Alert on "Losing Focus" when a double Ticket ID is indexed.

I want the alert when a TCKT_ID duplicate is entered. Specifically, I want to alert on the loss of Focus.

I have a dynamic Action with the event loses Focus and object DOM document.getElementsByName ('TCKT_ID').

How do reference the value entry so I can check if it exists in the DB.  I tried EXISTS

Select 1 from BPS_TCKT where TCKT_ID = apex_application.g_f06 (1)


But I get the error

Cannot parse the SQL query! ORA-06553: PLS-221: 'G_F06' is not a procedure or is not defined


Note: I used "apex_application.g_f06 (1)" to get the value in a part of the page once the page is submitted.

So why work in a select, but not in another?  (See what works, below).

Begin
Select apex_application.g_f05 (1) in: P63_SITE_CD FROM DUAL;
Select apex_application.g_f06 (1) in: P63_TCKT_ID FROM DUAL;
Select apex_application.g_f07 (1) in: P63_TCKT_STAT FROM DUAL;
Select apex_application.g_f08 (1) in: P63_TCKT_DSCRP_TX FROM DUAL;
End;

Thoughts,

Howard

Hi Howard,.

the session state for Page settings are set on submit, the lower part of your question is.

I would create an ARTICLE (in my example, P11_ERROR),

and then create 2 dynamic actions:

1.) Execute PL/SQL Code when lose Focus on point TCKT_ID

Code:

DECLARE

lv_counter NUMBER;

BEGIN

SELECT count (*)

IN lv_counter

Of your_tckt_table

WHERE tckid =: TCKT_ID;

IF lv_counter > 0 THEN

: P11_ERROR: = 'ERROR ';

ON THE OTHER

: P11_ERROR: = NULL;

END IF;

END;

Page_items to submit: TCKT_ID

Page referred to return: P11_ID

(2.) a dynamic Action that reports the error:

on change of State of P11_ERROR to the point: when ITEM IS NOT NULL

Action: Alert "error!" ID already exists! »

Works for me :-)

Tom

Tags: Database

Similar Questions

Maybe you are looking for

  • Cannot log into account

    Hello, Skype community and everything I need technical assistance. For some reason I can't sign into my Skype account with my Skype name today. Skype for desktop PC says "we can not open Skype. You are already connected to this computer. Please log o

  • HP Pavilion 20 All - In - One PC: HP Pavilion all-in-one PC card parent 20 P/N

    Hello I noticed that my CPU socket pins are bent. For the most part, I need to replace the motherboard. May I know what is the HP P/N for the motherboard and where I can buy it? No. H6P16AA #AB4 Model n ° 20 - a230d Thank you

  • PDA time control is not editable

    I have a PDA LV8.6 application installed on an iPAQ hx2490c running Windows Mobile 5.0.  On the front is a cluster that contains a DateTime control and a control chain.  Date/time control cannot be changed by using one of the functions available on t

  • Problem of extension RE6500

    Hello installed this several months ago without any problems and very satisfied with how it was easy to implement, however our main router died and we had to replace, but you can see the post for him you are impossible to connect, set password result

  • Applications of ask a program to open.

    The strangest thing ever... plain old ".exe" applications require a program to open. (With the help of Vista) Probably the most fundamental and prominent example of this problem is when I tried to use Notepad. He went to the 'Open with' window, so I