Pre populate an item with source type="Database Column"

Hello gurus,
How can I pre populate an item with source used "Always, replacing any..." and source type="Database Column"?
I have a form that creates/updates rows in a table and when creating a new row I want to populate some of the fields based on some parameters from the previous page. How can I achieve this?
I tried adding a conditional process when PK is null and populate the expected fields, but in the browser they are not shown with those values, even if I look into the session I can see that they have the values assigned in the process ?!?!?!
Thanks in advance,
Florin

Florin,
Use the Default Value item attribute. In you case, set the Default Value Type to Static Text with Session State Substitutions and enter your item using the &P1_ITEM_NAME. syntax in the Default value text box.
Thanks,
- Scott -

Similar Messages

  • BUG?: Paginate Doesn't Work with Page Item with Source as Database Column

    CREATE TABLE T_PARENT
      ID NUMBER NOT NULL
    , STAFFID VARCHAR2(20)
    , CONSTRAINT PARENT_PK PRIMARY KEY
        ID
      ENABLE
    insert into T_parent values (1, '77258317');
    commit;
    create table T_child as
    select
      rownum id
    , '77258317' staffid
    , dbms_random.string('U', 5) aa
    , dbms_random.string('U', 15) ab
    , dbms_random.string('U', 3) ac
    from dual
    connect by level <= 100;
    /Form page for T_PARENT.
    Classic report:
    select id, aa, ab, ac
    from t_child
    where staffid = :Px_STAFFIDTry and paginate = no data found.
    However, if you first submit the page, then paginate, it works as expected.
    Reproduced:
    http://apex.oracle.com/pls/apex/f?p=54920:57:106342795192226::::P57_ID:1
    If I for e.g. use an item with static assignment, it works fine.
    Cheers,
    Trent
    Edited by: trent on Apr 19, 2013 11:59 AM
    Also, it works fine when you reference the PK column.

    Just like with the paginate, the problem may also happens when you change the sort column or direction by clicking on the header.
    If the item in the WHERE clause was being set fromt he URL this wouldn't be an issue because it would be saved on the Persisten Session state.
    Regarding session state, there are two kinds Temporary or in memory and Persistent. When the page is rendering the item values are only on the Temporary session state. This is why the report renders correctly on page load.
    The item value won't go to Persistent session state until the page is submitted. Item values also go to Persistent session when they are passed in the URL, or explicitly set with a computation, etc..
    The Session state Dialog can only show the Persisten session state which is saved in DB tables. It's unable to show you the values during page render. For that you need other mechanisms like debug messages.
    I think that when you set page item as SQL query and Only when current value session state is null the value must be saved to Persistent session state. If you can examine the value with the Session Dialog then that would confirm that.
    Hope this helps.
    Thanks
    -Jorge

  • How to create an item with date type mm/yyyy (no day)

    Hello,
    Is it possible to create an item with date type mm/yyyy (no day)? I want the pop-up date picker to just show month and year.
    Thanks,
    Jen

    Hi,
    you cannot pop-up date picker to just show month and year, but you can set your item format as MM-YYYY
    You can check this APEX_ITEM.DATE_POPUP2 at : http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/apex_item.htm#CHDJHBCG (if using apex 4.1) else http://docs.oracle.com/cd/E10513_01/doc/apirefs.310/e12855/apex_item.htm#CHDFDDEI
    Edited by: Sergio_doudou on 2012-04-13 14:26

  • How populate itemrenderer items with data.

    How populate itemrenderer items with data. Ie after my app starts I generate an array collection that I want to assign as the data provider to each combobox in my item renderer, which im using in a datagrid.

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   minWidth="955"
                   minHeight="600">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <s:ArrayCollection id="booksWithStores">
                <fx:Object name="book1" stores="{new ArrayCollection(['store1','store2'])}"/>
                <fx:Object name="book2" stores="{new ArrayCollection(['store1','store3'])}"/>
                <fx:Object name="book3" stores="{new ArrayCollection(['store2','store3', 'store4'])}"/>
                <fx:Object name="book4" stores="{new ArrayCollection(['store1','store4'])}"/>
            </s:ArrayCollection>
            <s:ArrayCollection id="booksWithoutStores">
                <fx:Object name="bookA"/>
                <fx:Object name="bookB"/>
                <fx:Object name="bookC"/>
                <fx:Object name="bookD"/>
            </s:ArrayCollection>
            <s:ArrayCollection id="allStores">
                <fx:String>store1B</fx:String>
                <fx:String>store2B</fx:String>
                <fx:String>store3B</fx:String>
                <fx:String>store4B</fx:String>
            </s:ArrayCollection>
            <fx:Component id="renderer1" className="Renderer1">
                <s:MXDataGridItemRenderer>
                    <s:DropDownList dataProvider="{data.stores}" />   
                </s:MXDataGridItemRenderer>
            </fx:Component>
            <fx:Component id="renderer2" className="Renderer2">
                <s:MXDataGridItemRenderer>
                    <s:DropDownList dataProvider="{storesList}" />
                    <fx:Script>
                        <![CDATA[
                            import mx.collections.ArrayCollection;
                            [Bindable]
                            public var storesList:ArrayCollection;
                        ]]>
                    </fx:Script>
                </s:MXDataGridItemRenderer>
            </fx:Component>
        </fx:Declarations>
        <mx:Form>
            <mx:FormItem label="Dynamic Stores">
                <mx:DataGrid dataProvider="{booksWithStores}" width="354">
                    <mx:columns>
                        <mx:DataGridColumn dataField="name"/>
                        <mx:DataGridColumn dataField="stores" itemRenderer="{renderer1}"/>
                    </mx:columns>
                </mx:DataGrid>
            </mx:FormItem>
            <mx:FormItem label="Static Stores">
                <mx:DataGrid dataProvider="{booksWithoutStores}" width="354">
                    <mx:columns>
                        <mx:DataGridColumn dataField="name"/>
                        <mx:DataGridColumn dataField="stores" itemRenderer="{createRendererWithProperties(Renderer2, {storesList:allStores})}"/>
                    </mx:columns>
                </mx:DataGrid>
            </mx:FormItem>
        </mx:Form>
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                public static function createRendererWithProperties(renderer:Class, properties:Object):IFactory
                    var factory:ClassFactory=new ClassFactory(renderer);
                    factory.properties=properties;
                    return factory;
            ]]>
        </fx:Script>
    </s:Application>

  • Checking whether data exists in a BLOB type database column in Forms 6i

    I am developing an application regarding inventory of a plant's spare parts. I am storing photo (.bmp) of spares in the database in a column of BLOB type. Once user punches spare's code, form displays spares data on screen using EXECUTE_QUERY. At this stage I want to check whether picture (.bmp) data was found in BLOB type database column or not. I want to take action accordingly. How to check this. If it would be a numeric column, I would have checked NULL but NULL does not work with BLOB type coloumns.
    Pl. help.
    Thanks in anticipation.

    Did you look in the database documentation? The DBMS_LOB package has the method you need: getlength().
    This was more of a database question than a Forms question, so you'd probably have more luck with these types of questions on one of the other forums, like the database or SQL forums.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • Populate list Item with a recordgroup?

    Hi Friend
    I want to populate a list Item with a "Recordgroup". Does it possible without using the add_eliment function?
    I did it through the Loop to read the item from record group. If the database changes the record does not change in my list item. because the list containing the added items which was delivered in the load time. But like Pressing F9, we can easily see the last changed data of the database.
    If possible please send me the detail code to me. Here I delivered the detail procedure which i did for that purpose.
    Farhad
    ==========================================================
    PROCEDURE Populate_Item_In_List (     List_name VARCHAR2,
                                                                                         QUERY_Text VARCHAR2,
                                                                                         rg_Level_Col_name VARCHAR2,
                                                                                         rg_Value_Col_name VARCHAR2) IS
         HERE THE PROCEDURE POPULATE THE LIST WITH THE REQUIRED DATA UNDER A CORRCET SQL (SELECT) COMMAND
         List_name                     THE LIST ITEM WHICH HAS TO BE LOADED BY THIS PROCEDURE
         QUERY_Text                     THIS CONTAINS THE QUERY TEXT BY WHICH THE LIST ITEM WILL LOAD
         rg_Level_Col_name THIS IS THE LEVEL OF THE REQUIRED ITEM THAT OBVIUSLY A CHAR DATA TO BE RETRIVE
         rg_Value_Col_name THIS IS THE VALUE OF THE REQUIRED ITEM THAT OBVIUSLY A NUMBER DATA TO BE RETRIVE
                   R_Group          RecordGroup;
                   Rowcount      NUMBER;
                   rg_name      VARCHAR2(40) := 'DefaultRG';
                   rg_id      RecordGroup;
                   errcode      NUMBER;
                   Lid                    Item;
    BEGIN
         --+++++++++++++++++++++THIS IS USED TO POPULATE THE RECORD GROUP+++++++++++++++++++++++++++++++++
                   rg_id := Find_Group(rg_name);                                             Find the record group                                                   +
                                                      --+
                   IF Id_Null(rg_id) THEN                                                                                                                                                                          --+
                             rg_id := Create_Group_From_Query(rg_name,Query_Text);                                                                                     --+
                             errcode := Populate_Group(rg_id);                                                                                                                                       --+
                   else                                                                                                                                                                                                                       --+
                             errcode := Populate_Group_With_Query(rg_id,Query_Text);                                                                            --+
                   END IF;                                                                                                                                                                                                                  --+
         --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     
              If errcode = 1403 then
                   Message('There is no data to be retrive......');
              else
         --+++++++++++++++++++++THIS IS USED FOR LOADING DATA TO THE LIST ITEM++++++++++++++++++++++++++++
                   Rowcount      :=      Get_Group_Row_Count(rg_id);                              Counting the total rows in RGroup          +
                   Lid                    :=     Find_Item(List_name);                                                                                                                                            --+
                   Clear_list(Lid);                                                                                          Clear the list which is loaded now     +
                   FOR J IN 1..Rowcount LOOP                                                                                                                                                                     --+
         Add_List_Element(List_name,                                                            the name of the list item                              +
                                                      J,                                                                                index of the list                                                  +
                                                      Get_Group_Char_Cell('DefaultRG.'||rg_Level_Col_name,j),     Level of item+
                                                      Get_Group_Number_Cell('DefaultRG.'||rg_Value_Col_name,j) value of item+
                                                      );                                                                                                                                                                               --+
                   END LOOP;                                                                                                                                                                                                             --+
         --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
              end if;
    END;
    ===============================================================

    Hi Farhad,
    You can make use of Populate_List built-in.
    Populate_List(list_id, 'RECGRP');
    You can find more information in online documentation of forms.
    Cheers
    Zakiy

  • Pre-populate dynamic form with XFDF

    I am trying to pre-populate a form saved in Designer as a dynamic form. If the form is saved in either the 6.0 compatibile, or the 7.0 static pdf file format, my XFDF file works fine. If I open the PDF in Designer and save it as a dynamic form, the XFDF file opens the form in reader, but no data is populated.
    I have searched everywhere and haven't found any information on this. Any help is greatly appreciated.

    OK... so here's the update. The PDF file only has one vertically expanding field (a "Description") field on the page and it takes up about 2 vertical inches. If I open the PDF in Reader I can type into it and everything expands and flows correctly. If I use an XFDF file that contains a lot of data in the Description field, everything comes up perfectly. However, if I either modify my XFDF file, OR create an XFDF file that only has a tiny amount of data in the Description field (1-2 lines), the PDF is opened and no data is displayed anywhere in the form. If you click on a text field, any data that should be there magically appears. When you navigate out of that field, it disappears.
    This only happens if the XFDF file has a Description field value that doesn't cause the PDF Description field to expand past the 2 inches.
    I am new to Designer 7.0 and this is my first file that has dynamic flowing fields... is this a bug, or am I missing a property somewhere?
    Thanks

  • How do I null out an item based on a database column before display?

    I am using Apex 3.2
    I have an item that is based on database column. My customer wants me to "blank out" the item before it is displayed so the user will have to enter a new value in place of the one that is in the database.
    I have tried using a "before region" calculation to set the item to NULL. I can see the value getting set in the debug after the row fetch has occurred, but when the item is displayed, it contains the value from the database, not my calculated valuie.
    I also tried using an unsourced text field and then doing an after submit calculation to set the value of the database column item from there, but no luck that way either.
    Also tried clearing the item cache, but I think that happens way too early.
    There must be a simple way to do this..
    Any suggestion?

    No problem user486652 (name?),
    Yes, the $s function is one of ApEx's built-in's - see the ApEx documentation under API Reference, Javascript API's, and you'll find a wealth of built-in functions that do all sorts of things. For Javascript in general, take a look at www.w3schools.com for some really good tutorial and reference material - I use it constantly.
    Ok, so you want to set the browser field to empty after the page loads. Since this is a page event, it isn't something that will fire for a form field element so you don't want the code there. In ApEx 3.2, edit the attributes for the page, and you'll see a setting called "HTML Body Attribute". You'll see a helpful bullet note below the setting saying this is the place to add onload events. The proper syntax will be:
    onload="$s('P2_REMEDY_TICKET', '');"Once ApEx puts everything together and the page renders, this code will tell the browser to run that $s function after the page loads.
    But be aware - if you take a look at the help for that setting, you'll see that it mentions that this will only work if your page template includes the #ONLOAD# substitution string. Not sure if all ApEx-supplied page templates already have #ONLOAD#, but every one I've used does. If your code still doesn't work, check your page tempate. In the Definition region, under Header, you should see a body tag with something like:
    <body #ONLOAD#>...
    ...If that's there, your page template supports the HTML Body Attribute. If your body tag doesn't have an #ONLOAD#, add it.
    Hope this helps,
    John
    If you find this information useful, please mark the post "helpful" or "correct" so that others may benefit as well.*

  • Create a Table Dynamically in WEB Dynpro Java with diferent type of column

    Hi everyone, I have a question if is possible to create a table dynamically in Web Dynpro Java?, depending of the RFC consults create the rows dynamically, ,this table must have diferent type of columns, for example link column (when the user click this link execute an action and show a adobe interactive form in another view), image column (show an image depending of the information)
    Thank you everyone
    Atte Israel

    Hello,Israel.
    Yes , it is possible through dynamic programming in wdModify of the View.
    You can do this ,for example, using cell variants.
    IWDTable tab = (IWDTable) view.getElement("TABLE_NAME");               
    IWDTableStandardCell cellV= (IWDTableStandardCell) view.createElement(IWDTableStandardCell.class,"TableStandardCell"+i); 
    cellV.setVariantKey("NotEditableVariant");
    cellV.setCellDesign((WDTableCellDesign)wdContext.nodeTableDaysTitle().currentTableDaysTitleElement().getAttributeValue("CellDesign"+i));
    IWDTextView textViewi= (IWDTextView) view.createElement(IWDTextView.class,"TextView"+i);  // -- here you control the type of the object that is displayed in the cell
    textViewi.bindText(dayAttrib);
    cellV.setEditor(textViewi);          
    tabColumn.addCellVariant(cellV);
    tab.addGroupedColumn(tabColumn,tab.numberOfGroupedColumns());     
    Using this code you can control even specific cells in the table and not only columns.
    Hope this helps you,
    Constantine

  • Pre-populating many items with one call to the database

    Hi,
    I have a form, containing eight text items, that needs to provide a 'copy from latest record' function, so when the form is rendered in 'Create mode' the data from the latest record is copied to the form and can then be updated.
    I could use the 'Default Value' property of each item, but as I would be retrieving the same row for each item this doesn't seem very efficient.
    Can anyone recommend a better way of doing this?
    Thanks
    Andrew.

    Andrew,
    You could create a Process that runs On Load - Before Header that does a
    Select Into your items.
    e.g:
    Select Col1, Col2, Col3
       into  :P1_Field1, :P1_Field2, :P1_Field3
      from Your_Table
      Where (your conditions);Doug

  • Setting an Item with source

    I have a group of textboxes I want to populate with stored data, it's an edit existing data page. I've written the following under Source for one of my textboxes:
    SELECT process_valid
    FROM maintenance
    WHERE id = :NEWITEMNUM
    AND seq = :SEQUENCE
    I have Source used set to Always, Type set to SQL query and maintain set to Per Session.
    It comes up blank, Session state shows null value and Debug doesn't show that the query was processed. How do I get Source to populate my textbox?
    Furthermore, I tried to use something like this:
    SELECT exp_date, purpose, miles
    INTO :P7_DATE, :P7_PURPOSE, :P7_MILES
    FROM maintenance
    WHERE id = :NEWITEMNUM
    AND seq = :SEQUENCE
    And I got a No Data error.

    Definetely sounds like a session state issue if the straight query doesn't work....
    How are the items that Scott mentioned being populated? You aren't accidently doing something like clearing the cache on your branch and repopulating them too late on page load?
    What if you replace :NEWITEMNUM and :SEQUENCE with hard coded values within Apex? Does all look well then?

  • Unable to populate list items with criteria

    Hi
    I want to populate some values based on condition in a text field.
    I tried the code wihtout condition in new form instance and its working fine but when i tried with an condition on when mouse click on list item and its working for first action.If list having more than 1 values in list its became blank and not working
    DECLARE
    group_name varchar2(40) :='LSTCUR';
    group_id RecordGroup;
    list_id item := Find_item('TB.LSTCUR');
    status NUMBER;
    begin
    IF Id_null(group_id) THEN
    group_id := Create_Group_From_Query('LSTCUR','select distinct curr,curr from REC_CURR_V where br =:TB.PSRCH');
    END IF;
    Clear_list(list_id);
    status := Populate_Group('LSTCUR');
    Populate_list(list_id,group_id);
    end;
    rgds
    soumya

    soumya,
    Try this code.
    DECLARE
         RG_Group_ID RECORDGROUP;
         Num_Status NUMBER;
    BEGIN
         RG_Group_ID := FIND_GROUP('LSTCUR');
      IF NOT Id_Null(RG_Group_ID) THEN
              DELETE_GROUP(RG_Group_ID);
      END IF;
         RG_Group_ID := CREATE_GROUP_FROM_QUERY('LSTCUR', 'SELECT DISTINCT CURR, CURR FROM REC_CURR_V WHERE BR = ''' || :TB.PSRCH || '''');
         CLEAR_LIST('TB.LSTCUR');
         Num_Status := POPULATE_GROUP('LSTCUR');
         POPULATE_LIST('TB.LSTCUR', RG_Group_ID);
    END;Regards,
    Manu.
    If my response or the response of another was helpful, please mark it accordingly

  • How to pre-populate ADF form with data?

    Hi Guys,
    Just wondering how you go about generating a pre-populated ADF form. Is it something that is done though the ADF designer and Business Objects? or do you have to create the Database tables seperatley and bind them into ADF and the workflow. Specifically I want this so a user is presented with a several drop-down lists when the initiator human task is run.
    Thanks,
    Ross

    Hi Ross
    1. Yes, in the very first place in the Database, we added all the data manually for all the Lookups. Its our own custom Schema. We are planning to provide some simple admin screens in a different WebApps to maintain these lookup values. Note that this is a different simple ADF App, with one EJB Layer and EJB Layer calling this database and getting/updating the values.
    2. ALSO, we have some lookup values that we get from totally another System/application like Oracle EBS Suite. For this, we already have a custom schema created. In this custom schema, we have some stored procedures created by the EBS database developers (they are more familiar with EBS). Now within our EJB layer, we use JPA architecture, call these stored procedures, and get all the lookup values and show in the TaskDetails page. These lookup values are maintained in EBS itself, so we do not have any custom admin screens within our SOA/BPM project.
    In conclusion, for our SOA/BPM applications, we have like 2 Databases. First database is for SOA Components where we run RCU comand and it has all SOA_INFRA, MDS, ORABAM schemas etc. The second database is for our custom schema specific to our application. Here we have our own lookup tables, custom tables and any cutom stored procedures that coonect to external EBS etc. From Weblogic console, we just create a Datasource for this second database and use that in JPA layer (persistence.xml file). For the first database, you already know that at domain creation itself, it will create all datasources also.
    Thanks
    Ravi Jegga

  • Pre Populate AD UserPrincipalName with multiple IT Resources and 1 form - 11g r2

    I have an ICF AD connector with 3 IT resources, each one having a different domain (i.e. example.us.com, users.eu.com....). I only have 1 resource form though. When I prepopulate the UPN field, I have to do userlogin@domainame. When I go to map the variables I don't see Process Data > AD Server option in there. I was thinking of creating a custom adapter and just check which IT resource it's coming from to determine the domainof that IT resource.
    Has anyone ran into this issue before? I'm trying to avoid creating a new form for each IT resource since all the logic is the same except for UPN.
    Thanks

    I would recommend a unique workflow per domain.  It will just make things so much easier for you in the long run.  No domain performs in the same way and you might need to add and remove attributes from them.  It might sound simpler to start and use the same, but it's just not worth the headaches you will encounter in trying to identify them uniquely while having them all use the same workflow.
    -Kevin

  • Best way to pre-populate material variable with values for users

    Hi,  I have a requirement to prepopulate a material variable with about 5 materials and that is the materials that will default when the query is called.  The users would also need the ability to change those values.
    My thought is to create a User-exit variable that derives the values from a user maintained table (infoobject). 
    Does anyone else have any suggestions or ideas on the best way to handle this?

    I don't know if there is a best solution...
    Infoobject
    With this option you have to create a new infoobject (ZMATERIAL) without attribute (you need only a list material codes) and then to set the authorization profile for the user in order to manage the content.
    The creation of an infoobject corresponds to a table creation, but you don't need any other specific options that belong to the infooject (as technical object)...
    Table
    With this option you have to create a Z table with only one field and then to allow the maintenance of the table by SM30....
    In the ending, if you want to be a purist use the table, otherwise use an infoobject (but there are no significant differences !
    Bye,
    Roberto

Maybe you are looking for

  • Peformance its very slow Report BI 7

    Hi All, Very Good Morning......... Peformance it's very slow in Bex Report..... how to reactify the problem, please provide solutions ... Please provide step-by-step. If any possibel Enchancement of the report. Advance thanks........ Bye, Vijaay.

  • PDF Generation with database fields

    Hi! Well I have some questions and I was wondering if someone would be kind enough to answer. Here it goes. Scenario: The company that I work for is a non-profit educational institution. They wish to do a tax receipts project in which a student can l

  • XP on my MBP and an external display

    I am posting here because I got no love in the boot camp directory. Hi, I have a macbook pro (2.33 GHz intel core 2 duo) that I use for both work and home. We are remodeling our home and I am finally getting a home office put in. I have dreamed for y

  • Start of SMD agent fails!

    Hi! After the installation of SMD AGENT 7.00 SP09 we've got some problems starting the agent. The errorlog says: (/usr/sap/SMD/J98/SMDAgent/log/SMDSystem.0.log) Oct 11, 2006 2:11:26 PM [Thread[SMDAgent connection thread,5,main]] Error      Exception

  • Space Designer- 64 bit?

    Hello friends, Is Space Designer 64 bit when running in 64 bit mode? Altiverb is becoming problematic. Just curious. Thanks!