Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Developer Forms Help

Re: Developer Forms Help

From: Kresimir Fabijanic <kresimir_at_ozemail.com.au>
Date: Sun, 2 Jul 2000 11:36:38 +1000
Message-Id: <10545.111066@fatcity.com>


Mr Majestic

How are you populating those values? Which version of forms are you using? Why do you need checkboxes - as you mentioned yourself, these two actions are pretty much mutually exclusive - also you can achieve same thing using 'update' and 'insert' database triggers? Do you use PL/SQL in form based triggers or do you call stored procedures in database? Which events do you attach those triggers to?

Check the system variables - i.e. USER and SYSDATE - If you are using PL/SQL code to populate them just allocate value :

cat_create_user_nm := USER;
cat_create_dt := SYSDATE;

PL/SQL have ability to address system variables directly.

Just remember (in Forms) to set your datatype for cat_create_dt and cat_last_mod_dt to datetime. So that you do not have to debug your application for two hours only to discover that you have done a silly error.

HTH Kind regards

Kresimir Fabijanic

> Hi
> I'm currently creating a form with a check box. I have item fields of
> cat_create_user_nm, cat_create_dt, cat_last_mod_user_nm and,
> cat_last_mod_dt .
>
> Can I return the user logged on and the date logged on into the values
above
> without having to manually type the entry? I want to be able to use two
> check boxes to select from. One is an insert check box and the other is an
> update check box.
>
> When inserting, there can only be one choice (The insert check box).
>
> When updating, the cat_create_user_nm and cat_create_dt have already been
> filled. The update check box has to be selected for an update.
>
> I was trying a select from dual, but I keep getting an error. Anyone know
> how I could get the user and date values of a person logged in?
>
> Thanks
> Student
>
>
> SELECT user, sysdate
> INTO :catalog.cat_create_user_nm, :catalog.cat_create_dt
> FROM dual;
>
> ____________________________________________________________________
> -- When-checkbox-changed
>
> DECLARE
> v_alert NUMBER;
> v_user VARCHAR2(30) := user;
> v_date DATE := sysdate;
> IF checkbox_checked('control.insert') then
> --
> set_item_property('catalog.cat_create_user_nm',displayed,property_true);
> --

set_item_property('catalog.cat_create_user_nm',enabled,property_true);
> --
> set_item_property('catalog.cat_create_user_nm',navigable,property_true);
> :catalog.cat_create_user_nm := v_user;
> :catalog.cat_create_dt := v_date;
> else
> null;
> --
> set_item_property('catalog.cat_create_user_nm',displayed,property_false);
> END IF;
>
> EXCEPTION WHEN dup_val_on_index THEN
> v_alert := show_alert('ERROR');
> RAISE Form_Trigger_Failure;
> END;
>
>
>
>
> --------
> If you're bored, then visit the list's website: http://www.lazydba.com
(updated daily)
> to unsubscribe, send a blank email to oracledba-unsubscribe_at_quickdoc.co.uk
Received on Sat Jul 01 2000 - 20:36:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US