Set initial value as the number of sequence/date/from the user

Hi guys, I created a datablock and set up the user interface to allow users to insert all the data they need, however my table has a:

ID - which is uniqe with each entry of the table is then gernerate by a sequence (that I created on the database), but when I put seq.nextval in the initial value on the datablock it says that I can not do that, so how can I use the sequence to insert the value in this field in the database. It's my first key in my whichobviosuly database my users cannot enter data for, on the contrary, it is generated automatically.

User - in the same way in the datablock is a user field that has the user that inserted record, I know I can set the default for this field, but how to make the user automatically insert through forms on the database.

Same again how put SYSDATE is automatically entered in the field date when the user submits the file?

Any help on this would be GREATLY appreciated.

Thanks in advance.

Published by: user13390506 on August 5, 2010 04:11

The DUAL table:
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14200/queries009.htm#sthref3198

With: new, you reference the column should be inserted (in a trigger to update you: old and: where new: old contains the value before and: new value after the update of the column)

Regarding your real problem: without a few pieces of code fails and you did, it's a little difficult to say what happened here. If you could get better answers by sharing.

Sharing also the Versions of database (4 digits) and Versions of forms is important in order to obtain a response apropriate.

Anyway: you seem to be new to the whole forms / SQL / PL/SQL stuff, so I might suggest:
http://Tahiti.Oracle.com is a very good starting point for SQL and PL/SQL. This isn't a RTFM but rather a Council. Once you got used to you will like it. For my part, I could not live without tahiti: D.

Cheers.

Tags: Oracle Development

Similar Questions

  • How to set the initial value of the same value as the Page loading of SelectOneMenu

    Hello

    I noticed that in my value = "#{bean.selectedItem page}" of selectonemenu is always null when loading the page and because of that there is a difference in the initial value and the value sent as valuechangelistener is shot because of this difference, I don't want to happen. "

    I call the method to load the values into selectonemenu in the constructor of my bean.

    How can I make sure that the initial value is always the same as the value at the time of page load so that valuechangelistener would not fire unless the user changes the options in selectonemenu. Because of this problem I am facing a lot of issues like valuechangelistener is going to get fired.

    Any help is much appreciated.

    Thank you

    Yes, you will need to find a way to set the value before the creation of the part of the view. Generally, there are two ways. There are at least two ways, I tend to use:

    (1) loading deferred; you would get a Get accessor like this method:

    public String getValue(){
      if(value == null){
        // code here to get value from wherever
      }
    
      return value;
    }
    

    (2) initialize properties in a method annotated with @PostConstruct in your backing bean

    @PostConstruct
    public void initialize(){
      value = whatever;
    }
    

    Hope that helps you. If this isn't the case, so I totally misunderstood you and you try to explain more clearly what your problem is.

  • Initial value of the checkbox field is not affected.

    Hello

    I have a custom form with 2 fields, which is a check box which is below the values
    Value when checked: 1
    Value when disabled: 0
    Mapping of other values box: checked

    and the other is a text field. Please insert text fields field data into the table db that are checked.

    Iof displayed the Web file number is 10.


    I use the code in the trigger of the COMMIT BUTTON to save data in the table below. that is, I'm insertion of the value of the text field in table for the check box that is checked

    GO_BLOCK ("CHANNELS");
    premier_enregistrement;
    LOOP
    IF: CHANNELS. CHECK = 1 THEN
    INSERT into...
    WHEN THE OUTPUT: SYSTEM. LAST_RECORD = "TRUE";
    NEXT_RECORD;
    END LOOP;
    COMMIT;
    END;


    The problem is the value of the checkbox is always null and records are not get inserted into the table. Y at - it elsewhere, that we have to specify the initial value of the box. Not sure why the value of the checkbox becomes void even if the ix checked checkbox.

    Thank you
    Didi.

    What you have listed for the property of the initial value of your box?

    Craig...

  • Default or initial value to the choice of the Message drop-down list

    Hello

    How to set the initial value to choose list (Message choice drop-down) based on the State of certain? in R12.1.3.

    setValue do not work, please help.


    IF cust_function = "NH" then set message of choice initial value items has another b (on A, b, c, d...) in extended CO.

    Thank you

    Hello

    for the dropdown list use this

    class oracle.apps.fnd.framework.webui.beans.OAWebBeanPickList

    Get your list of choices

    Use these functions to set initial values based on the State.

    setDefaultValue (String defaultValue)
    setSelectionValue (pageContext OAPageContext, String selectionValue)
    Set selection - internal value of the element of choice that will be shown as selected.

    Kind regards
    Pradeep

  • Initial values of the node

    The configuration guide, the initial value given to a node works as one according to the default rules and slow down the performance of the model.

    Perform the first value given for total functionality also contribute to performance problems.

    I think that everything that initializes a value in the Configurator can eventually have an impact on performance. From my experience, simpler models seems not have any notable performance degradation when using defaulting rules. It is usually noticed in the large models. However, in almost all occasions, I encounter undesirable side effects of the use of the default values. The biggest problem is that you can run any questions, if you decide to change the 'initial' value and restore it later a model with the original 'initial value '. in these cases, when the model is restored, the initial value or the default value is not saved as an entry. Instead, the new default is applied. These is generally not desirable.

    For the totals, I suggest that you write a rule that contributes the initial value of the total immediately when the model is true.

    Thank you
    Jason

  • How to set 'Initial value' of an element of messageTextInput dynamically

    How can I dynamically set 'Initial value' of a messageTextInput point?

    Hello

    Su wrote:
    curr.setValue (pageContext,"" + r.getAttribute (0) ");

    String value = r.getAttribute (0);

    curr.setValue (pageContext, value);

    Concerning
    Meher Irk

  • Problem with pl/sql procedure, trying to get the value of the user during execution

    Hello

    Using oracle 11.2.0.3

    Can run sql that gets the value of the user during the fine workmanship and also via an anonymous block.

    uses of SQL & Enter_Product_Number

    anonymous block using: Enter_Product_number.

    However, get problems when trying to create a pl/sql procedure, use one of the above

    relevant below tried code part & and: buit works do not error, try bad bind variable if used: and ora-600 if try use &.

    How can we have a procedure from pl/sql that can call and receives a value of user during execution?

    Only way around what I can think of is to pass parameters to the procedure

    Thank you

    create or replace procedure ins_into_issues is

    v_nd_rec_cnt number (10);

    v_normal_rec_cnt number (10);

    Start

    Select count (*)

    in v_nd_rec_cnt

    refmast.issues I have

    where i.iss_product_num = & old_nd_product_number;

    Select count (*)

    in v_normal_rec_cnt

    refmast.issues I have

    where i.iss_product_num = & normal_product_number;

    -code below commented above works.

    end;

    Hello

    what something like this:

    create or replace procedure INS_INTO_ISSUES ( in_normal number, in_old number )  is
      v_nd_rec_cnt     number(10);
      v_normal_rec_cnt number(10);
    begin
        select count(*)
          into v_nd_rec_cnt
         from refmast.issues i
         where i.iss_product_num = in_old;
      --
        select count(*)
          into v_normal_rec_cnt
          from refmast.issues i
         where i.iss_product_num = in_normal;
    end;
    

    concerning

    Kay

  • Get the value of the user in plsql environment

    Hi all

    I am writing a program like below:

    DECLARE

    v_user VARCHAR2 (10);

    v_pswd VARCHAR2 (4);

    v_cardN VARCHAR2 (5);

    v_authState BOOLEAN;

    v_choice NUMBER;

    BEGIN

    DBMS_OUTPUT. Put_line ("Welcome to the Bank! Enter your 5-digit card number ");"

    v_cardN: = '& Card_Number';

    v_user: = "& username ';"

    v_pswd: = "& PIN";

    v_authState: = Authenticate_user (v_cardN, v_user, v_pswd);

    IF this is v_authState THEN

    DBMS_OUTPUT. Put_line ("failed authentication! Please re - enter your details).

    GOTO end_line;

    ON THE OTHER

    DBMS_OUTPUT. Put_line (' authentication successful!) Welcome ' | v_user);

    -ATM_Operation();

    END IF;

    DBMS_OUTPUT. Put_line (' what do you want to run');

    DBMS_OUTPUT. PUT_LINE(' 1.) Balance inquiry '. CHR (10) | "2 remove ' | CHR (10) | "3 deposit '. CHR (10) | ("4 check last three Transactions ');

    v_choice: = & choice;

    < < end_line > >

    NULL;

    END;

    /

    Enter the value of card_number: 12347

    Enter the user name: Himanshu

    Enter the value for the PIN: 1234

    Enter the value of the choice: 3

    Welcome to the Bank! Enter your 5-digit card number

    Authentication failed! Please enter your details

    PL/SQL procedure successfully completed.

    It's getting all values quoted with & < variable > got guest quickly even if requested subsequently.

    What is my requirement is: I want the value that arises only when it is requested in order. As choice is requested only after successful authentication.

    Have we not all features in plsql done for user input in this way.

    Please let me know is there within language plsql or not? Or it is possible by taking help of coding code plsql with unix environment or java to achieve?

    It's getting all values quoted with & got invites quickly even if requested subsequently.

    Of course they are! SQL * more is a client tool. It will be:

    1 parse the input

    2. ask all THE required values

    3 replace the values by the user entry in the code

    4. present the code for execution

    5. display the results.

    The code runs on the server and the server has NO contact with the user.

    What is my requirement is: I want the value that arises only when it is requested in order. As choice is requested only after successful authentication.

    Then, you will need to write a client application that will ask at your leisure. Write a Java application to do and then use JDBC to send code or queries to the database.

    Have we not all features in plsql done for user input in this way.

    No - PL/SQL runs on the server. The server has NO contact or interaction with the user.

  • The text element values value when the user clicks a report line.

    The text element values value when the user clicks a report line.

    I have a report based on the EMP table and two elements P911_EMPNO, P911_DEPTNO. When I click on one of the lines the EMPNO and DEPTNO is copied to the text elements.
    It works fine if I leave the EMPNO and DEPTNO as SHOW report, but if I then these clear values are not retrieved the report form (my javascript is very limited).

    I need a method to retrieve the data hidden in the report and display in the text without the reposting of the page elements.

    Also, would be nice if the line was highlighted until another line is clicked but especially is my priority.

    Elements
    P911_EMPNO, P911_DEPTNO (field of disabled text, saves the State)

    Report
    Select * from emp using the model of report below.

    Custom model.
    standard_report_cust_P330-a copy of the standard report with a change model.
    BEFORE EACH LINE
    < tr onclick = "selectRow (this);" #HIGHLIGHT_ROW # >


    * Javascript in the Page Header.*
    < script language = "JavaScript1.1" type = "text/javascript" >
    function selectRow (p_tr)
    {
    var l_deptno = p_tr.childNodes [8] .innerHTML;
    var l_empno = p_tr.childNodes [1] .innerHTML;
    html_GetElement ('P911_DEPTNO'). Value = l_deptno;
    html_GetElement ('P911_EMPNO'). Value = l_empno;
    }
    < /script >

    If anyone has any ideas. Thanks, Pete

    Hello

    When you use this type of report model, you actually control on where the column values are used - and they can be used several times.

    For example, a setting of 'Model line 1' for one such model could be:

    <tr>
    <td class="c1">#1#</td>
    <td class="c2">#2#</td>
    <td class="c2">#3#</td>
    <td class="c2">#4#</td>
    <td class="c3">#5#</td>
    </tr>
    

    #1 # fact refers to the data in the first column, #2 # for the second and so on. So you can do:

    <tr onclick="javascript:dosomething('#1#','#2#');">
    <td class="c1">#1#</td>
    <td class="c2">#2#</td>
    <td class="c2">#3#</td>
    <td class="c3">#5#</td>
    </tr>
    

    For example, by clicking on the line would trigger the dosomething() function and pass in that the values of the first and second columns. Also note that the 4 # does not appear now - this column is 'hidden' (but note that you must check the box to show the column)

    Andy

  • Must pass the value of the user interface

    Hello!!

    I use jdeveloper 11.1.1.5
    I had dragged and dropped three textboxes entered my user interface
    I need to pass the values of the user interface to my methods of AMImpl

    that is in my methods of AMImpl

    VO2.setNamedWhereClauseParam ("Year", [AF:ImputTextBox1]);
    VO2.setNamedWhereClauseParam ("period", [AF:ImputTextBox2]);
    VO2.setNamedWhereClauseParam ("bu", [AF:InputTextBox3]);
    VO2. ExecuteQuery();

    What is the code that lets you get this error? It is obvious that you had the wrong argument type.

  • Initial value of the checkbox

    Hello
    I have a box with the following properties.
    Value when checked: Y
    When disabled value: N
    Initial value: N

    I want this checkbox to be unchecked initially.

    But when I open the form, the box is checked. Any suggestions?


    Kind regards
    Suresh

    Suresh,

    Check the box values. And Checked is coming for the new record, or extracted registration?

    If its for recovered the value NULL, then set the CheckBox mapping of other values as disabled.

    Kind regards

    Manu.

    If my answer or the answer to another person has been useful or appropriate, please mark accordingly

  • Initial value of the article display

    Hello

    Forms 6i,

    I use some display items with an original value (of the text), they are not db-objects, they are on a control block,

    the problem is when I run the form, the text (initial value) are missing, I don't know why.

    But if I moved the display settings to the db block I, it displays the text in this regard?

    Thank you

    Because block display of the element is not active.  the block has probably only display point or like him.  any block must have at least one navigable element.

    Add the element of text on the same block, you will see that the value of the element display will appear.

    Best regards

    Celal

    If the answer helps you, please tick the right answer or helpful response.

  • Can not set a value by the executed dynamic action on the page element "selection list."

    I created an agenda of the page 'list of selection' and I want to when I change a value in another element of the page set only 'screen '.

    I created a dynamic action on the page element "selection list" for this.

    These are the dynamic action attribute:

    When:

    ======

    Event: change

    Selection type: point

    Article: P29_PURCHASE_ORDER

    Condition: No strings attached

    Advanced:

    ========

    Scope of the event: static

    Identification:

    ==========

    Action: Set

    The ' Action Page when the changed value "attribute of the element of 'list of selection' = 'None', and when I run form the dynamic action run and set the value for once and do not update the value according to the change in the article"list of selection. "

    Note: when I change the previous attribute of 'Redirect and set', dynamic action run and properly value, but the value was hidden soon

    I want to value when the value of change of select list according to this change successfully.

    Please, advice me,

    Best regards

    Mustafa Ezzat

    Hello

    you set the value of the 'Page elements to submit' to P29_PURCHASE_ORDER?

    Then, the SQL statement would use the current selected value.

    This is the help text says: "specify a list separated by commas of the elements of the page that will be submitted to the server and therefore available for use in your"SQL statement"," PL/SQL Expression"or"Body of the PL/SQL function".»

    Kind regards

    Erik-jan

  • Set a value for the range selector

    Hello

    I'm trying to set a value for a range by script selector but without success.

    Here is my line of code:

    -app.project.item (1).layer("Text1").property ("ADBE Text properties") .property ("ADBE Text Animator").property("ADBE_Text_Selector").property ("ADBE Text Index End") .setValue (3);

    the error I get is "Undefiened is not an object.

    Maybe the property method does not work for the range selector.

    I am rookie in script... that could explain the issue

    Thank you

    Aurélien

    Looks like you're missing a few steps. A host of text is included in the Group of text animations. A range selector is in the Group of selectors of text. Each of them can be referenced by name or index (you can have several animators and selectors).

    App.Project.Item (1).layer("Text1").property ("ADBE Text properties") ("ADBE Text animators") .property .property (1).property("ADBE_Text_Selectors").property (1) .property ("ADBE Text Index End") .setValue (3);

    I recommend you google and download the script "GimmePropPaths" from Jeff Almasol. Invaluable for this kid to reference.

    Paul

  • Use case: initial value in the filter Table

    Hello world

    I've been struggling with this problem and I'm about to give up! :-(

    My requirement is to have a table with filters, which must have an initial value, which must be visible by users as soon as it connects, then it can be default value for the filter change or deleted.

    I use Jdev 12 c and jspx pages and unlimited workflow.


    Please help me with all of the recommendations.

    Kind regards

    Jose.

    Hello

    Finally, I crushed filterModel of the table in this way, and it works!

    public FilterableQueryDescriptor getFilterModel() {}

    Map httpSessionMap = ADFContext.getCurrent () .getSessionScope ();

    String freshLogin = (String) httpSessionMap.get ("freshLogin");

    FacesCtrlSearchBinding = sbinding

    (FacesCtrlSearchBinding) JSFUtils.resolveExpression ("#{bindings.}");

    QPF FilterableQueryDescriptor = sbinding.getQueryDescriptor ((FilterableQueryDescriptor));

    If (freshLogin == null) {}

    Get the initial value

    BindingContext bctx = BindingContext.getCurrent ();

    BindingContainer links = bctx.getCurrentBindingsEntry ();

    AttributeBinding attBinding = (AttributeBinding) bindings.get ("");

    String userEntity = (String) attBinding.getInputValue ();

    Assing as a criterion

    Map fcMap = fqd.getFilterCriteria ();

    fcMap.put ("", userEntity);

    Run the query

    sbinding.processQuery (new QueryEvent (getProjectsTable (), QPF));

    Avoid the next run

    httpSessionMap.put ("freshLogin", "false");

    }

    return the QPF;

    }

    Thank you very much for you help!

Maybe you are looking for

  • update of the iOS 10.0.2 - 0 Bars No. Service

    I have an iPhone running iOS 10.0.2 5. Since I've upgraded to iOS 10.0.2 I got 0 carrier bar in the upper left to left of my carrier (Verizon), which means that I can't send or receive phone calls. I tried restarting the phone, reset my network setti

  • Firefox Mobile sync gives me "incorrect recovery key. Please try again. »

    It is a continuation of this issue, which has been closed without resolution: http://support.Mozilla.org/en-us/questions/931089 I use a custom synchronization server and get the "incorrect recovery key. Please try again. "whenever I click on"Connect

  • T420 RAM upgrade

    Hi all Today, I have several T-420 and I need to spend 4 of them, so I need new batteries (np) and 4 GB of RAM. The original 4 GB of RAM is a Ramaxel 4 gb 2rx8 PC3 - 10600S - 999 But the LENOVO Web site is only to offer me to buy a 4 GB SODIMM DDR3 -

  • (Redirected) Alienware x 51 r2 problem.

    Hey everyone will so in the title I'm having some problems with my x 51 r2, I had no problem for over 3 years now. Going where it started, playing games to turn off completely. I will try and keep it short, I opened my case press the power button / f

  • I get calls from someone who says he is from Microsoft, I asked to call back number, which is 650-989-1221 it is Microsoft?

    This man sounded like he was reading a script with an accent as the India, but he said he's in California... He said my computer is corrupt and sending signals and something else I don't remember. He said that it is from microsoft, but I told him not