Remote column in the form of Bulletin Board on db update

Hi all

my need is to update the date and user modified folder. Nothing new.

I use to work with trigger on a local database as in this example:

CREATE OR REPLACE TRIGGER "MY_LOCAL_TABLE_T2"
BEFORE
insert or update on "MY_LOCAL_TABLE"
for each row
begin
if (:new.CREATED is null)
then
:new.CREATED := sysdate;
end if;
if (:new.CREATED_BY is null)
then
:new.CREATED_BY := nvl(v('APP_USER'),user);
end if;
:new.UPDATED := sysdate;
:new.UPDATED_BY := nvl(v('APP_USER'),user);
end;

I'm doing the same thing, but I use Apex with a tabular presentation based on a vision of a remote table.

When I try to compile the trigger this error:

PLS-00201: identifier 'V' must be declared.

Another way to do the same thing directly in the Apex solution or suggestion will be appreciated.

Thank you all.

Request Express 4.1.1.00.23

Self-funded, thanks

trying to create the trigger with your suggestion the error PLS-00201: identifier ' APEX_UTIL. GET_SESSION_STATE' must be declared is triggered.

I think because of the BD Remote where I have my tables "not see" apex db with func and procs.

I found this solution which can be reused for different sub tabular form using jQuery:

-in the form of tables, there are 2 columns I want to update the date of LAST_UPD and LAST_UPD_BY varchar

-set LAST_UPD like this:

- Number / Date Format : DD-MM-YYYY HH24:MI:SS

- Attributes of the element : audit = "date".

- Default : sysdate

-set LAST_UPD_BY like this:

- Attributes of the element : audit = "user".

- Default : v ('APP_USER')

-Page - JavaScript

$( document ).ready(function() {
    $("input[id*='f0']").change(function() {
        idAuditDate = $("input[audit='date']").attr('id').substr(0,4) + $(this).attr('id').substr(4);
        idAuditUser = $("input[audit='user']").attr('id').substr(0,4) + $(this).attr('id').substr(4);
        var d = new Date,
        dformat = [d.getDate(),
                                d.getMonth(),
                                d.getFullYear()].join('-')+' '+
                                [d.getHours(),
                                d.getMinutes(),
                                d.getSeconds()].join(':');
        $("input[id="+idAuditDate+"]").attr('value',dformat);
        $("input[id="+idAuditUser+"]").attr('value','&APP_USER.');
    });
});

Hope this helps.

Thank you

Tags: Database

Similar Questions

  • Comparison of column in the form of table II

    Hello

    At the APEX 4.1 I am doing something similar to this thread: in table form: compare two fields in column where I need to do a validation on two columns in tabular form. It works for both columns are columns of text box, but I can't make it work when comparing to a single column to display. For validation, I have defined it as an "Expression of PL/SQL" and my expression is: CURRENT_VALUE >: PREV_VALUE where CURRENT_VALUE is a column of text box that accepts user input and PREV_VALUE is only one display column.

    Regardless of the absorbed power, the row is updated without any errors raised; He seems to treat the single display value in the vacuum and made the comparison with an empty value. The only solution I could find was to make the comparison in a update trigger on and will raise an error if validation fails; but the result is not as nice as the built in features of validation of the APEX.

    No indication on how to make it work using the validation of the APEX is greatly appreciated.

    Thank you!

    Only column display are for display only and are not saved in the session when you send, so that you can't access with pl/sql.

    So either do the validation in javascript/jQuery or, and it is best if you ask me, make a text field and set to read-only.

  • Master-detail-shape; Hide/show columns in the form of details according to the column

    Hello

    I have a form master detail. In the long form, I have the columns:
    ID, MASTER_ID_FK, PC_SOURCE, A_C1, A_C2, A_C3, B_C1, B_C2, B_C3

    The PC_SOURCE of the column must be a LOV with values
    NULL VALUE
    A
    B

    So if I choose or enter a master record the detailed form appears and I can enter one or more detail records.

    PC_SOURCE is the first column.
    If I choose one, the columns B_C1, B_C2, B_C3 should disappear as there should be no possible entry.
    If I have B, A_C1, A_C3, A_C2 columsn should disappear as there should be no possible entry.

    Is this possible?

    I tried a bit of my own, but without success. I tried to put in the first column (lov SOURCE PC) in the attributes of the element a javascript call like onChange = "do_Refresh('#PC_SOURCE#'); »

    The javascript funktion do_Refresh tries to grab the value of the column and the value of a hidden item P1_SOURCE as document.getElementById('P1_SOURCE').value = v_source;

    But this does not work, because there is not the value of the recovered column.
    And probably can´t work because of more lines of a detail.

    Thank you and best regards,
    Matthias

    Hello

    The html code of your detailed form will be an array of the elements of entry with names f01, f02, etc.. The columns of the key of the fields are normally hidden, so your PC_SOURCE column will probably use the name f03. A_C1 column name will be f04 etc.

    Once you have the input names for your columns, you can create a dynamic action (DA) to hide the items you want.

    You want the DA to fire when any element PC_SOURCE is changed if you want when to be:
    Event: change
    Selection type: jQuery Selector
    jQuery Selector: input [name = "f03"]
    Condition: no strings attached

    The action is to hide an element in the same line, if the changed item is a value. The action must therefore:
    Action: Run the JavaScript Code
    Fires when the event is: true
    Code: if(this.triggeringElement.value=="A") {$x_Hide ('f04_' + this.triggeringElement.id.split ('_') [1])}

    You then need a lot of real actions for each item that you want to hide.

    Rod West

  • Only read the column in the form of planning

    Hi gurus,

    I want to do a red column in planning webform. How can I achieve this? If I give read access to this column for a user and assume that it is a computed column, the calculation is done for the user? To calculate a cell in the form, is that he needed centimeters to write to the user?

    Kind regards

    Hello

    Say you want to have Jan, Feb in your columns, but you want to make read-only Feb, that's what it takes

    In the columns/line under the column dimension tab

    Select period in the drop-down list, enter Jan as a member.

    Now click on add a column

    Enter Feb for the Member, click read-only.

    Ok?

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Forcing of the forms of running JRE version 6 update 20 - please help!

    What the devil? I use the following code in my setup in the Formsweb.cfg file to force the use of Java Version 6 Update 20: (update the code that I used previously forced Java Version 6, 4)
    jpi_download_page=http://java.sun.com/javase/downloads/
    jpi_classid=clsid:CAFEEFAC-0016-0000-0020-ABCDEFFEDCBA
    jpi_codebase=http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab#Version=1,6,0,20
    jpi_mimetype=application/x-java-applet;jpi-version=1.6.0_20
    But now, when I open a form, I get a "warning - security" message. It reads as follows:
    Java has discovered application components that could indicate a security concern.
    
    Name: Oracle.forms.engine.Main
    
    Block potentially unsafe components (Recommend)?         [YES]    [NO]
    
    The application contains both signed and unsigned code.
    Why am I suddenly this message? If I click No. so I can continue normally, but I get the message whenever I open the form.

    What happens if I click YES?

    Take a look:
    http://download.Oracle.com/docs/CD/E17409_01/JavaSE/6/docs/TechNotes/guides/jweb/mixed_code.html

    But I would probably go to sign all files .jar you will need to adjust the security settings for each client...

    see you soon

  • Copy data from one column to another column in the form of customization

    Hi all

    I need, it's that I need to copy the value of a column to another column.

    But the two columns are different from the TAB

    Who be used, please send me the code.

    Thank you

    And can you describe your condition more clearly?

    My question was... you try to copy the incident followed summary on behalf of the task? In this case, you will need to find the event that triggers ONCE you have entered your resume. Enter in the preview, select display custom events and see what events are triggered. These are the 'moments' that you can use to add additional programming.

  • FILL A SINGLE COLUMN IN THE FORM OF A FIELD IN ANOTHER REGION.

    Hello

    I am using Oracle APEX 4.2. In one of my pages, I have two regions. One of them has a text field and a button, as well as the region, another with a tabular presentation.

    http://Apex.Oracle.com/pls/Apex/f?p=41771:2:14057730603424:

    I want to enter some data in the field of text and when I press the button called Estado, just checked lines change the value in the State column.

    Help, please!

    Thank you.

    Eve

    Dear Eve,

    I did a PL/SQL process called updatePAGObyEstado executed when you press the button with the following code

    BEGIN
       for i in 1..apex_application.g_f01.count loop
         update PAGO
         set PAGO_ESTADO = :P2_VALOR
         where PAGO_ID = apex_application.g_f01(i);
       end loop;
       COMMIT;
    END;
    

    Please, if this solves your problem, mark it as Correct.

    Best regards
    Mahmoud

  • How to organize columns in the form

    Hello
    I want to see real-> FY09 configuration-> seven in a single column and forecasts FY09-> Oct in another column. I used to know how to do this, but forgot how. I can't find the button that will allow me to have different column groups. Someone can help me.

    Hello

    I consider you talk about asymmetric columns, have a read of:-http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_admin/frameset.htm?ch06s03s14.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • URL OF THE LINK COLUMN IN THE FORM OF MANUAL

    Hi all

    I have a problem with my APEX Solution. I created a manual tabular presentation, that works perfectly. But the problem is I want a convert (Projectname) - SQL query to a URL link. The link goes to the same application, but another page with parameters. I want to send the project ID to this other page, where I can EDIT my project. The problem here is that it does not work.

    Here's my Soluition.

    FOR A IN

    (

    SELECT PR_ID,

    APEX_ITEM. Hidden (1, PR_ID) ID,.

    -Die Akbulak Werteliste festlegen der.

    APEX_ITEM. DISPLAY_AND_SAVE (2, PR_NAME, "readonly ="readonly"style =" width: 565px;)  font-size: 13px; "", « f02 » || " ROWNUM') PROJEKTNAME,.

    APEX_ITEM. DISPLAY_AND_SAVE (3, PR_C_DATE, "readonly ="readonly"style =" width: 565px;)  font-size: 13px; » ', « f03 » ||' ROWNUM') C_DATE,.

    APEX_ITEM. DISPLAY_AND_SAVE (4, PR_U_DATE, "readonly ="readonly"style =" width: 565px;)  font-size: 13px; » ', « f04 » ||' ROWNUM') U_DATE

    OF TM_PROJEKTE

    )

    LOOP

    X: = X + 1;

    HTP. P (')

    < table width = "100%" id = "td2" align = "center" cellpadding = "1" cellspacing = "1" >

    < b >

    < scope = "col" id = 'td2' th > < table width = "100%" id = "td2" cellspacing = "0" >

    < b >

    < td width = "40px" height = "35" align = "center" valign = "middle" margin left = "3px" > ' | X ||' '|| a.ID |' < table >

    < id td = "td3" height = "35" align = "left" valign = "middle" margin left = "3px" > < a href = "f? p = & APP_ID.:999: & SESSION. : NO::P999_PROJEKT_ID :'|| a.ID | » « > ' || a.PROJEKTNAME | "< /a > < table >

    < td width = "120px" height = "35" align = "center" valign = "middle" > ' | a.C_DATE | "< table >

    < td width = "120px" height = "35" align = "center" padding: 1px valign = "middle" margin left = "3px" > ' | a.U_DATE | "< table >

    < /tr >

    < /table >

    < /table >

    ');

    END LOOP;

    But when I click projectname, then the P999 item does not show the ID - Nr but "< input type =".

    Can you please help me.

    Hello

    have you tried to change

    href = "f? p = & APP_ID.: 999: & SESSION. : NO::P999_PROJEKT_ID :'|| a.ID | »

    TO

    href = "f? p = & APP_ID.: 999: & SESSION. : NO::P999_PROJEKT_ID :'|| a.PR_ID |'?

    Concerning

  • JavaScript to check if the form fields have been changed before update

    Hi all

    I thought I've done this before, but couldn't find my notes. Basically, I want to display an alert message indicating there is nothing left to save
    When the user clicks on apply changes on a form, if there is no change made to any form elements and let it do
    the normal updating when it does.

    Please tell me some old links where I could find some good examples.

    Thank you.

    Yoyoy

    Hi Yoyoy,

    This example might work for you http://apex.oracle.com/pls/otn/f?p=31517:258:17559948275256:

    Kind regards
    Erik-jan

  • How to add the new column in the tabular layout editor in Oracle Forms

    Hello

    I need to add the new column to a datablock and display the newly added column in the form. What are the steps I need to follow.

    1. I chose the new column from the view to the datablock.
    2. Add the text element in the layout editor. But this position is not correct. It overlaps with another column. How to add the new column to the layout editor?

    Thank you
    HC

    In the layout editor, you can simply drag the fields so that they do not overlap.
    See http://www.youtube.com/watch?v=7emNa7THMLg

    Sandeep Gandhi

  • Calculate the sum of the 2 columns in the total column.

    Hello everyone.

    I have a question I hope you can help us

    I use the form of oracle 10 g , I made the table student FYI There are 5 columns ( HomeWorks, project, Midterm1, Midterm2,FinalExam), , I need to calculate these brands and put it in ( Total ) column using the form of the oracle. How to? .

    Another thing is it possible for me to restrict the user so that he can not enter more than 10 points for homework and not more than 15 points for project, etc.?

    I hope you can answer me I am really really really really grateful that I searched online, but no real solution especially for the second part of the question. will I change the varchar2 to the numbers?

    Thank you

    Yes... What you have to do is, you create when validating the element trigger on assignment, then put under code of the project

    IF (: blockname.itemname) > 20 THEN

    MESSAGE ("you must enter only less than 20 brands '");

    RAISE FORM_TRIGGER_FAILURE;

    END IF;

    Make the total, rank as a display element. Create a button contained within this block and put the code below in this WHEN the BUTTOM PRESSED trigger

    DECLARE

    v_total NUMBER;

    BEGIN

    v_total: =: Blockname. Mid1 +: Blockname. MID2 +: blockname.assignment +: Blockname. Final +: Blockname. Project;

    : blockname.total: = v_total;

    : blockname.grade: = CASE WHEN v_total<60   then ="">

    WHEN v_total<65   then ="">

    WHEN v_total<70   then ="">

    WHEN v_total<75   then ="">

    WHEN v_total<80   then ="">

    WHEN v_total<85   then ="">

    WHEN v_total<90   then ="">

    WHEN v_total<95   then ="">

    WHEN v_total<=100 then="">

    END;

    END;

  • ReadOnly columns on tabular forms (Javascript?)

    I have a question in regaurds to tabular forms. I have a tabular form in place, works perfectly. However, I want to be able to do some readonly columns to add the new line (new button line).

    Scenario:

    (1) go to the sub table form
    2) click Add row
    (3) once the new line apppears, columns must all be read only columns (i.e. cant type in there)
    (4) exception: there is a column, a selection list, which should not be readonly.
    (5) according to the whose value is selected in the select list, determines the columns that will be editable or non-read-only.

    -The last step is simply a conditional. The part that has plagued me accesses actual columns in the form of tables. I'm not sure how to in this regard. I still make changes to the actual::AddRow() function itsself?

    Thanks for any help in advance

    Best regards, #StillLearningApexGuy

    Check this example

    http://Apex.Oracle.com/pls/Apex/f?p=46417:11

    Sign in as test/test

  • How to make a reference to a column from the column in a table other source

    Hello

    I have a tabular presentation (created using Wizard), in which a selection list, and the values in this list depends on another column in the form of tables.

    I tried 'Selection list (query based lov)' and mentioned the other column using #COL_NAME # and directly by COL_NAME, but nothing works.

    also tried using the dynamic query 'return "my query" ' but it does not work also.

    If someone has worked on a scenario like this, thanks for posting the solution.

    I get this error when I tried to the foregoing:
    report error:
    ORA-20001: Error fetching column value: ORA-06550: line 1, column 56:
    PL/SQL: ORA-01744: inappropriate INTO
    ORA-06550: line 1, column 13:
    PL/SQL: SQL Statement ignored
    Apex 4.1
    Oracle 11 g 2

    Kind regards
    Tauceef

    Published by: Tauceef on 5 December 2012 10:42

    See + {: identifier of the thread = 2250770} +.

  • Checkbox on the form of the apex

    Hi Experts,

    I have a table that stores the values of open for each column (1 or 0). I have created a page of apex and placed check boxes and each box using sql queries to select the value of the indicator table and based on the return (1 or 0) box must be checked or unchecked. I is, each check box is replaced with two checkboxes. Why is this happening? How can I solve this problem?

    Really grateful if someone can help me on this point,

    T.Kurubaran.

    Hello

    You create a form based on the table and include all flag columns in the form. Each flag column will have an associated page element, for example P1_FLAG_A with the source of the element of the corresponding column, for example FLAG_A in the database. You can then edit the P1_FLAG_A item to display a check box. The number of boxes that appear for a P1_FLAG_A article is controlled by the number of values in the list of values associated with the element P1_FLAG_A. Therefore, you must create a static named LOV returning a single value 1 (the display of a value space or you want displayed next to the checkbox). The agenda of the P1_FLAG_A page should then use this operation named LOV, with no additional value and no null values to ensure that a single checkbox is displayed.

    The agenda of the P1_FLAG_A checkbox will check if the FLAG_A column 1. To ensure that the FLAG_A column is set to 0 when the form is saved with a disabled checkbox, you can create a submit after calculation of the P1_FLAG_A element that defines the P1_FLAG_A element to 0 conditional when the page P1_FLAG_A element is NULL.

    Rod West

Maybe you are looking for