Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Location
    down on the cube farm, left then right then another left
    Posts
    467

    Unanswered: using Forms program unit in an LOV

    Setup: Forms 9i, 9i data base

    Can someone tell me what is wrong here? The documentation leads me to believe this should work. I have this function:
    FUNCTION lov_check_mr_lock RETURN NUMBER IS
    recipe_id varchar2(10);
    BEGIN
    forms_ddl('savepoint a');
    SELECT master_recipe_id
    INTO recipe_id
    FROM mdm_master_recipes
    WHERE master_recipe_id = :mdm_master_recipes.master_recipe_id
    FOR UPDATE NOWAIT;
    forms_ddl('rollback to a');
    RETURN(0);

    EXCEPTION
    WHEN OTHERS THEN
    RETURN(1);

    END;

    and I have this LOV record group:

    select master_recipe_id
    from mdm_master_recipes
    where lov_check_mr_lock(master_recipe_id) = 0;

    when I try to apply it I get:

    ORA-00904 "LOV_CHECK_MR_LOCK": invalid identifier

    is this not possible?
    NOTE: Please disregard the label "Senior Member".

  2. #2
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110

    Re: using Forms program unit in an LOV

    Originally posted by Todd Barkus
    Setup: Forms 9i, 9i data base

    Can someone tell me what is wrong here? The documentation leads me to believe this should work. I have this function:
    FUNCTION lov_check_mr_lock RETURN NUMBER IS
    recipe_id varchar2(10);
    BEGIN
    forms_ddl('savepoint a');
    SELECT master_recipe_id
    INTO recipe_id
    FROM mdm_master_recipes
    WHERE master_recipe_id = :mdm_master_recipes.master_recipe_id
    FOR UPDATE NOWAIT;
    forms_ddl('rollback to a');
    RETURN(0);

    EXCEPTION
    WHEN OTHERS THEN
    RETURN(1);

    END;

    and I have this LOV record group:

    select master_recipe_id
    from mdm_master_recipes
    where lov_check_mr_lock(master_recipe_id) = 0;

    when I try to apply it I get:

    ORA-00904 "LOV_CHECK_MR_LOCK": invalid identifier

    is this not possible?
    I think select can not pick up funcitons defined within forms.

  3. #3
    Join Date
    Jul 2002
    Location
    Brazil - Rio de Janeiro
    Posts
    7

    Re: using Forms program unit in an LOV

    Originally posted by lynden.zhang
    I think select can not pick up funcitons defined within forms.
    Definitivly right what lynden wrote.

    You either need to create the function on the DB and call it from you select or move the select to the form.

  4. #4
    Join Date
    Jan 2004
    Location
    North Haven, CT
    Posts
    110

    Re: using Forms program unit in an LOV

    Originally posted by brunno_c
    Definitivly right what lynden wrote.

    You either need to create the function on the DB and call it from you select or move the select to the form.
    I believe they are two issues here:
    1. You cannot use a function defined within forms in a select statement within the form or in the backend.
    2. That function doesn't look like you can put it in the select statement even you move the function to the backend.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •