Form not displaying primary key field

I create a form and the primary field is not displayed???

Hi user10731167.
When u use a create form wizard, it ask u about your primary key column, and build the form with the primary key element hidden.
Depending you data structure, you'd want the primary key be generated trough a trigger firing a sequence or not, but many times this is a no relevant data for the user but relevant to manipulate DML operations.
Depending your preferences, you can change this element type to standard (read only) o standard read write to "show" it, but this is not an option when you manage couple of tables where primary key of master tables are referenced in detail tables.
Happy year

Similar Messages

  • How can I avoid displaying Primary key fields in BC4J .......

    Hi,
    I am using auto-sequencing in the create method to assign values
    to primary keys - therefore I do not need to display these
    primary key columns to the user, etc. How can I do that.
    Thanks in advance.
    KI

    I will try to help you
    1. go to your bc4j
    2. Double click the entity object
    3. Select attributes setting tab
    4. Select your key attribute and unchecked 'mandatory'
    5. Select apply and close this windows
    6. Double click the view object and select the attributes
    setting tab
    7. Select your key attribute and on updatable option
    select 'Never'
    8. Good luck

  • How to display the Primary key field in Application Form.

    IDFINALNO , USERNAME
    (No view) , RockQin
    I developed one new application form which is including the "Edit" item in every record.
    But I can not find the data that is Primary key field . So how to config the property to display that data.
    Thanks a lot!

    One of the guidelines when selecting column for a primary key is:
    Choose a column whose data values are never changed. A primary key value is only used to identify a row in the table, and its data should never be used for any other purpose. Therefore, primary key values should rarely or never be changed.
    Cheers!

  • Setting primary key field value in jdoPrestore() not flushed to database ?BUG?

    Hello,
    When I set value of primary key field of a new instance in jdoPrestore() new
    value does not get flushed to database - old (default) value get stored
    instead. All other fields assigned in jdoPrestore() get successfully
    flushed except primary key one.
    Alex

    Abe,
    You fixed only part of the problem. Right now if I assign value to a PK
    field in jdoPreStore() it does get flushed but there is another issue - all
    other instances which referenced the one I assigned PK to will not get this
    PK value. Example A references B, in B.jdoPreStore() I generate id for B -
    b.id = 100. When A gets flushed it would not get 100 in its b_id field.
    Specs says:
    This method is called ***before the values are stored from the instance to
    the StateManager***.
    Data store fields that might have been affected by modified non-persistent
    fields should
    be updated in this method. This method is modified by the enhancer so that
    changes to
    persistent fields will be reflected in the data store.
    The context in which this call is made allows access to the
    PersistenceManager and
    other persistent JDO instances.
    I read it as callbacks should be invoked on ALL instances before they get
    stored to StateManager. Does Kodo invoke callbacks for all istances first
    and then store them to instance manager? Based on the problem I am having it
    does not look like it
    Alex
    "Abe White" <[email protected]> wrote in message
    news:[email protected]..
    I just confirmed this as a bug and fixed it. We should be able to post
    the new jars for you soon. Hang in there.

  • Change primary key field in Master-Detail Form (Urgent)

    Hi,
    Can some experts share your valuable experience on the problem below?
    We have created a form Master-Detail relation. For some reasons, we have to allow the primary key field to be editable. But we couln't achieve it in Form 6i. It gives update error during commit.
    Your kind help will be highly appreciated.
    Regards,
    YM

    Hi there,
    I think the problem is because u are updating the primary key in the master block but since it is a master detail block u need to update it in the detail block as well.so what i suggest u to do is in the pre-insert trigger assign the value of master primarykey to the detail primary key....
    just check this out hopefully this shud help u.
    Bye
    Atul

  • Form Not Displaying

    Would any one know how to display a form in a Portal, I am trying to use it to inserted values into a table, but every time I create it none of the fields display?
    Thanks in advance

    Hi user10731167.
    When u use a create form wizard, it ask u about your primary key column, and build the form with the primary key element hidden.
    Depending you data structure, you'd want the primary key be generated trough a trigger firing a sequence or not, but many times this is a no relevant data for the user but relevant to manipulate DML operations.
    Depending your preferences, you can change this element type to standard (read only) o standard read write to "show" it, but this is not an option when you manage couple of tables where primary key of master tables are referenced in detail tables.
    Happy year

  • Problems with BC4J input select tag when its bounded to a primary key field

    HI..
    I have an jsp BC4J edit form. This form uses a BC4J input select tag. This component is mapping one of the primary key Entity fields.
    When im working with this component and it doesnt map a primary key field it shows the default "none" value when im inserting a record(thats Ok). but when it maps a primary key field the default value is a database value so it is not advisable.. How can i do in order to fix that?
    Thank you

    The none value is only shown when the field accepts null values.

  • Problems referencing a primary key field in a master-detail

    Hello,
    I am making an application where I have a master-detail page.
    In the detail section it is possible to add new rows using the standard "Add row"-button that the wizard creates.
    The detail section has a column with a link in it. This link leads to another part of the application.
    When I press this link I would like to send the field "Id" of the current detail row to the page which the link redirects to.
    So far I have concluded that the primary key field "Id" of the detail is only filled out after I do a submit. So I have my column link set up to do:
    javascript: doSubmit('NAVIGATE_1');
    In the branching I am testing on the :REQUEST object to see if it contains 'NAVIGATE_1' - I can't seem to get the value from the "Id" field though. I tried to add #ID# in the javascript submit call - but since the "Id" is filled only after I submitted then this doesnt really work at all.
    Does anyone have an idea on how to make this work in APEX ? Its probably some simple thing that I just didnt think of yet ;)
    Kind regards
    Bo Normann

    I found a way. I dont like it - but it works.
    I made a column link in the detail with the following:
    javascript: doSubmit('NAVIGATE@#ROWNUM#);
    This way I obtain information in the :REQUEST object about which row was clicked.
    In a After submit process on the page I then parse this :REQUEST object like this:
    DECLARE
    v_row NUMBER;
    v_pos NUMBER;
    BEGIN
    v_pos := instr(:REQUEST,'@',-1);
    v_row := substr(:REQUEST, v_pos+1);
    IF APEX_Application.g_f02(v_row) IS NOT NULL THEN
    :P_PRIMARY_KEY_ID:= APEX_Application.g_f02(v_row);
    ELSE
    :P_PRIMARY_KEY_ID:= -1;
    END IF;
    END;
    I know that my "Id" column is named f02 in the form, so this way I can find the id. I then assign this id to a kind of global variable - on the page I redirected to I can now find the Id.
    Talk about ugly code :P

  • How to add a new data element for existing table filed(Primary key field)

    Hi Experts,
    How to add a new data element for existing table field(Primary key field)
    For this filed ther is no foreign key relation ships and even check table.
    while activating table it is giving message like below.
    can you help any one to solve this and wil steps to add new dataelement for existing primary key filed of a table.
    Check table (NAMING SPACE/TABLE NAME(EX:/TC/VENDOR)) (username/19.02.10/03:29)           
    Primary key change not permitted for value table /TC/VENDOR
    Check on table  /TC/VENDOR resulted in errors              
    Thanks
    Ravi

    Hi,
    Easiest way is to download the table eg into an Excel table (if possible) or text table. Drop the table from the database. Build your table with the new key field. Build the database table again and fill it.
    You can do it also over the database into a new table. Drop the old one. Build the enhanced one and fill it. Afterwards drop your (temporary) table.
    Maybe there are other ways, but this works.
    Success,
    Rob

  • Problems deleting a primary key field in a table.

    Hello Guys,
    I deleted a primary key field in a custom table by clicking 'delete row' icon and then tried activating it through se14 - database utility. It is throwing an error saying 'Primary key change not permited for the value table zxxxx'. What is the problem???
    How can I delete a primary key in a table??
    Please help.
    Thanks,
    Naren

    I am pasting the detail explaination over that error.
    Primary key change not permitted for value table ZTV_RANGE_NUMBER
    Message no. AD 300
    Diagnosis
    This table is defined as a check table. For reasons of consistency, changes to the primary key of the table are not allowed.
    Procedure
    If it is essential that you change the primary key, you must delete the relevant foreign keys. Refer to the where-used list to find all tables containing a field that is checked against this table. Delete the foreign keys for these fields.
    If necessary, maintain the deleted foreign keys again.

  • Adding 2 new fields as Primary Key field in a Z Table which is existing PRD

    Hi Friends,
    I have to add two new fields as primary key fields in a Z TABLE, which is existing in Quality and Production Systems with Data.
    If I incorporate these two new fields (Primary Key fields) in development and if the TR is moved to Quality and Production sytems, is there any possibility of loss in data will happen at Quality and Prd systems?
    At present, Table is having 20 fields with 2 primary key fields and i have to add 2 more primary key fields.
    I have checked in SCN and not find relevant threads.
    Please help me out.
    Regards,
    Suresh.

    NO . It wont be a problem .
    For ex :
    If you have VBELN  , POSNR are key fields now , you have an unique reord with that combination .
    If you add one other field in it  fo ex  VKBUR  then records will be like this
    VBELN     POSNR     VKBUR   MATERIAL   QTY
    10020      10                            abcxyz      1
    10020      10            1234        abcxyz     1
    So your previous records before adding new primary keys , will have new fields balnk , and the new records will have data filled up in all primary key fields .
    However , if you try to update the existing records that will be in existing PRIMARYKEY combination only .
    for example if you try update record 1 above with VKBUR value 85858 , it creates a new record , it wont be updated in existing record.
    Hope this helps , Pls let me know if u have any more doubts.

  • Cannot modify value of primary key field after lookup.

    I realize this could be a WebSphere problem, but I don't know if it is an EJB problem or what? So I'm posting anyway, and adding Duke Dollars in the hopes someone out there has encountered this.
    Okay, I'm using WebSphere Studio Application Developer 4.0.3.
    I am using an EJB that has three primary key fields.
    I use the primary keys to lookup the bean.
    I then want to update the value of one of the primary keys.
    So I create a setter and getter method for that primary key field.
    I then can call the set method, but it does nothing.
    I get no errors.
    It compiles.
    I rebuild, regenerate access beans, and redeploy and rmic.
    I can use ctrl-space to see the functions in the JSP editor.
    However, the set function never gets called for some reason, and I get no runtime exception either.
    For example, if I do this in my code:
    MyBeanFactory myBean = new MyBeanFactory();
    MyBeanKey myBeanKey = new MyBean(name,age,city);
    MyBean myBean = myBeanFactory.findByPrimaryKey(myBeanKey);
    // this function doesn't do anything, because it's a primary key field
    // but it does compile and I get no runtime errors
    myBean.setCity("Orlando");
    // this function works fine, presumably because it isn't a primary key
    myBean.setState("Florida");Questions;
    Is there a restriction that says I can't update the value of a field if it is marked as a primary key?
    If not, what could I be doing wrong?

    Looks like your appserver is working as per the specification.
    Check this out:
    Question
    How can I update the primary key field in a CMP Entity Bean?
    Derived from
    A question posed by Shanks75 shanks75
    Topics
    Java:API:EJB:EntityBean:CMP, Java:API:EJB:2.0
    Author
    Tim Duggan
    Created
    Oct 9, 2001
    Answer
    You cannot change the primary key field of an Entity bean. Refer to page 130 of the EJB 2.0 specification, it states "Once the
    primary key for an entity bean has been set, the Bean Provider must not attempt to change it by use of set accessor methods
    on the primary key cmp-fields. The Bean provider should therefore not expose the set accessor methods for the primary key
    cmp-fields in the component interface of the entity bean."
    A work around to update a primary key field, would be to remove and then an re-create the bean.
    taken from here:
    http://www.jguru.com/faq/view.jsp?EID=515864

  • Default Primary Key Field of any database table

    hi,
    I am working on a database in which the data in the tables is generated from some other modules. I have to add, view and update functionalities to this table in the database. Unfortunately there is no primary key field for the table i am working on and as some existing modules are using this table i am not allowed to change the design of the table at this stage.
    Without primary i think its not possible to do updates. Because if all fields can have their values changed, then there will be a breakdown if the field value changes in the mid time when i had already retrieved the data to show on the screen, but not yet updated the value in the database. I hope you understood my problem.
    Please suggest solutions. I am not sure, but i think i read somewhere that every table created has a default primary associated whose value is always incresing with a new addtion of recored and its value never decreases. But i am unable to recollect the field name...i think it is some thing like[b] OID .... But i checked there is no such field name by OID. So please help me with some alternative solution...or by telling the default primary key field name.
    Thanx

    All the databases I know (namely Informix, PostgreSQL, SQL Server, even Access) have a row id column generated automatically.
    PostgreSQL example
    There is a way to read the value of this column; for example with PostgreSQL let�s say you have the following:
    CREATE TABLE no_id_column (
    column_one varchar(80),
    column_two varchar(80)
    INSERT INTO no_id_column(column_one, column_two) VALUES (�red�, �pink�);
    INSERT INTO no_id_column(column_one, column_two) VALUES (�yellow�, �orange�);Certainly, if we executed:
    SELECT * FROM no_id_column;Would obtain:
    column_one          column_two
    red               pink
    yellow               orangeBut if we modify the query
    SELECT  oid, * FROM no_id_column;We magically obtain a row identificator
    oid          column_one          column_two
    21569          red               pink
    21570          yellow               orangeThe data in the oid column is generated automatically by the database manager. Every time we insert a row we�ll have a different one. Just take into account that if the database contains a large amount of data, the oid could cycle.

  • Setting primary key fields from sequence. Please advise

    What is the most logical place to automatically set primary key fields from
    sequence?
    jdoPrestore seems to be a little late - my instance will not have id till
    it's committed. I can not do it in constructor because it gets called every
    time Kodo needs to construct an instance. What other options do I have for
    automatic pk assignment except do it in my code (hate it)?
    I wish I could use store managed OIDs but I need access to OID underlying
    data
    Please also see my previous message "Application Identity Extention"

    I came up with following pattern:
    public class OrgUnit implements InstanceCallbacks {
    private long orgUnitId = -1;
    private transient long tempOrgUnitId = -1;
    public long getOrgUnitId() {
    if (orgUnitId < 0) {
    if (tempOrgUnitId < 0) {
    tempOrgUnitId = JDOFactory.getNextSequenceId(getClass());
    return tempOrgUnitId;
    } else {
    return orgUnitId;
    public void jdoPreStore() {
    if (!JDOHelper.isDeleted(this)) {
    if (orgUnitId < 0) {
    setOrgUnitId(getOrgUnitId());
    I use -1 as an indicator that ID has not been assigned yet. If you use Long
    instead of long it will be cleaner since we can test for null
    "Alex Roytman" <[email protected]> wrote in message
    news:9q27co$r35$[email protected]..
    What is the most logical place to automatically set primary key fieldsfrom
    sequence?
    jdoPrestore seems to be a little late - my instance will not have id till
    it's committed. I can not do it in constructor because it gets calledevery
    time Kodo needs to construct an instance. What other options do I have for
    automatic pk assignment except do it in my code (hate it)?
    I wish I could use store managed OIDs but I need access to OID underlying
    data
    Please also see my previous message "Application Identity Extention"

  • Primary key field problem in DBSchema Wizard

    Hi,
    I am using Sun ONE studio 4 update 1, EE.
    I have generated schema using the Database Schema Wizard.
    The generated table representations does not recognise the primary key fields so I can not map my CMP to any table :-(
    Is this a bug?
    because I have generated schemas from 3 different databases (IBM, MySQL, SAP) and the tables have primary key fields.
    When I get a connection in Runtime Pane under Database node, I can see the primary fields are highlighted with red color.
    However, when I obtain the schema using, New->Database->Database Schema, there are no primary key fields generated.
    Anyone have any ideas, work around?
    Thanks
    Tex...

    First, thanks for posting the code that lets us reproduce your test. That is essential for issues like this.
    Because the primary key is global you will not be able to use
    INCLUDING INDEXES
    WITH VALIDATION;And you will need to add the primary key to the temp table
    ALTER TABLE DEMO_INTERVAL_DATA_LOAD_Y ADD CONSTRAINT IDX_DEMO_ROLL_Y PRIMARY KEY (ROLL_NUM);The the exchange will work. You will need to rebuild the primary key after the exchange.

Maybe you are looking for

  • Syncing to multiple computers

    when syncing my ipod touch to my computer at work, it deletes everything stored from my home computer. what am i doing wrong?

  • Can't see iCal in .mac account

    I am brand new to Mac and apologize if this is dense of me. . . .I can't find my iCal in my .mac account. I've published it, synchronized everything and still can't see it. Is there a special place I should look or something else I need to do? Also -

  • Problems with microphone.

    Problems with microphone during calls. Person who communicates not hear me. If you stickyour finger in the little back room I heard for a while and then disappears. I tried restore to no avail. How can I fix it?

  • Devsuit upgrade error from 10.1.2.0 to 10.1.2.3

    hi all, as i upgrade the devsuit from 10.1.2.0 to 10.1.2.3 by universal installer, but the following error is thrown, Please help, many thanks. java.io.IOException: The system cannot find the file specified      at oracle.sysman.oii.oiix.OiixJarClass

  • 10.0.2 ENABLE MULTITRACK RECORDING

    Hi, I upgraded to version 10.0.2 garageband, unlike the old version, now I can not enable multitrack recording, to play the piano and listen to my voice even without recording. thx