Button to add member to collection

Hi,
I created the following collection in the before-header page process and also created an updatable report region. How can I create a "ADD ROW" button in that region in order to add a member to the collection. That is, I want to be able to click the "ADD ROW" button so that it will call the PL/SQL to do wwv_flow_collection.add_member().
Here is the collection:
-- reset collection
if apex_collection.collection_exists(p_collection_name => 'FUND') then
apex_collection.delete_collection(p_collection_name => 'FUND');
end if;
-- populate collection
apex_collection.create_collection_from_query(
p_collection_name => 'FUND',
p_query => 'select
f.hr_form3_funding_pk,
f.hr_vacancy_pk,
f.budgeted_class,
f.index_code,
f.position_control_no,
f.sub_fund,
f.budget_program,
f.project_code,
f.grant_code,
f.funding_percent
from hr_form3_funding_new f
where hr_vacancy_pk = 14448');

Hi,
I know this post is over a year old, however I am running into the same situation and was wondering if you were able to resolve adding a row to your collection.
I have a similar create collection before header and have created an updateable sql report from the collection. I used the wizard to create an add row button without success and have also tried calling the following pl/sql process from a button on the report thinking that it would insert a row into the collection and would appear on the report when re-queried however this also does not work.
APEX_COLLECTION.ADD_MEMBER (
P_COLLECTION_NAME => 'AGMT_TMK',
P_C001 => :P594_AGENCY_ID,
P_C002 => :P594_AGMT_DOC_NO,
P_C003 => null,
P_C004 => null);
Any pointers would be greatly appreciated.
Thanks,
Mike

Similar Messages

  • Add members to collection from sql updatable report.

    I have created a collection based on a query (collection_name = 'EMP_COLLECTION' query = select name, ssn, dept from emp.
    The collection is created perfectly.
    Now, I have a page with a SQL-updatable Report based off of the collection
    (select * from htmldb_collection where collection_name = 'EMP_COLLECTION'. The collection rows appear, and I am able to press an ADD button to add a row. I fill in the data using the key DEPT which a pull from a field stored on the page.
    How can I reference the other fields in the collection...#NAME#, #SSN# (as they are not items on the page).
    Please let me know if you need clarification on this question as I realize I am a bit out of my league in describing it....but could really use a tip.
    Karen

    Karen,
    I recently began working on collections, so here are a few code snippets that may help you:
    Create Collection (placed in a Before Header Page Process)
    apex_collection.create_or_truncate_collection
    (p_collection_name => 'SOME_COLLECTION');
    Initially populate a collection with default values (placed in a Before Header Page Process)
    DECLARE
    i number;
    cntr number := 5; -- Sets number of default entries in collection
    BEGIN
    for i in 1..cntr loop
    APEX_COLLECTION.ADD_MEMBER(
    p_collection_name => 'SOME_COLLECTION',
    p_c001 => 0, --Unique ID
    p_c002 => :P10_ITEM_NM, -- Item Name
    p_c003 => NULL, -- Description
    p_c004 => sysdate, -- Date of Entry
    end loop;
    END;
    each p_cXXX is a reference to a column in the collection.
    View existing collection
    SELECT SEQ_ID,
    c001 ID,
    c002 ITEM_NM,
    c003 ITEM_DESC,
    c004 ITEM_ENTRY_DATE,
    from APEX_COLLECTIONS
    where COLLECTION_NAME = 'SOME_COLLECTION'
    You can also turn this into an editable collection by going into the report and individually changing the fields to text fields, dropdowns, etc.
    To Update a collection (On Submit, After computations Page Process)
    declare
    c pls_integer := 0;
    begin
    for c1 in (
    select seq_id from apex_collections
    where collection_name = 'SOME_COLLECTION'
    order by seq_id) loop
    c := c+1;
    --Item Name
    apex_collection.update_member_attribute (p_collection_name=> 'SOME_COLLECTION',
    p_seq=> c1.seq_id,p_attr_number =>2,p_attr_value=>wwv_flow.g_f01(c));
    --Item Description
    apex_collection.update_member_attribute (p_collection_name=> 'SOME_COLLECTION',
    p_seq=> c1.seq_id,p_attr_number =>3,p_attr_value=>wwv_flow.g_f02(c));
    --Item Entry Date
    apex_collection.update_member_attribute (p_collection_name=> 'SOME_COLLECTION',
    p_seq=> c1.seq_id,p_attr_number =>4,p_attr_value=>wwv_flow.g_f03(c));
    end loop;
    end;
    In this example, the ID field is hidden to the users and populated using a sequence. The other fields are presented as text fields for Item Name and Item Description and a Date Picker for the Item Entry Date.
    The key to understanding this is that the attribute number indicated by p_attr_number references the column in the COLLECTION containing the value you want to update/overwrite. The g_fXX tells which of the updatable columns in your report provide the values for the columns. Keep in mind that the number of updateable columns in your report is likely fewer than the total number of columns, so the numbering here starts from the first updatable column and goes down. If you rearrange the order of the columns in the display, it will not alter the field in the collection you reference (the attribute), but it WILL alter the g_fXX notation you use to get the value from.
    Writing to the DB
    declare
    begin
    for c1 in (select TO_NUMBER(c001) row_id, c002 itm_nm, c003 itm_desc,
    to_date(c004,'DD/MM/YYYY') itm_dt from APEX_COLLECTIONS
    where COLLECTION_NAME = 'SOME_COLLECTION') loop
    insert into ITEMS (ITEM_ID, ITEM_NAME, ITEM_DESC, ITEM_DATE)
    values (c1.row_id, c1.itm_nm, c1.itm_desc, c1.itm_dt);
    end loop;
    end;
    Here, the trick is to reference the items using the [collection name].[attribute alias] syntax. This avoids the Oracle error "can't use a column".
    If you want to reference items not on the page and put them into the collection, I recommend pre-populating them, since the user isn't going to be able to alter something they can't see anyway. I have used this successfully with both page items and application items.
    Cheers.

  • Add-Member Value help

    I'm building an array and wanted to add the below property:
    $TEMPARRAY | Add-Member -Type NoteProperty -Name TEST -Value "$($item.Member[0].Address)"+":"+"$($item.Member[$i].Port)"
    PS complains about not specifying a secondary value.  I had to create a new variable for the desired value, and then set value to the new variable.  Is there any way to do this without the extra variable?
    $NEWVAR = "$($item.Member[0].Address)"+":"+"$($item.Member[$i].Port)"
    $TEMPARRAY | Add-Member -Type NoteProperty -Name TEST -Value $NEWVAR

    You use the += operator to add an element to an array.
    Alternatively, you can create your array using ArrayList and use the Add method:
    http://msdn.microsoft.com/en-us/library/system.collections.arraylist%28v=vs.100%29.aspx
    http://technet.microsoft.com/en-us/library/ee692802.aspx
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Have you attempted a restore?

  • How do I use a button to add "1" to a number?

    I'm sure this is so simple that I'm going to be smacking my forehead when someone gives me the answer but for the life of me, I can't figure out how to do this.
    I'm making a simple pdf that lists ticket prices for an event. I want the button to add one to the number of tickets ordered every time it's clicked. I need the starting value to be "0" tickets. How do I do this?

    Hi,
    Use a variable to strore the value. In the click event of the button increment the value. In the click event of the button, you can put the following code.
    var count +=1;
    Thanks,
    Bibhu.

  • Using family sharing, how does one view and download songs from a family member's collection in itunes?

    Using family sharing, how does one view and download songs from a family member's collection in itunes?

    When you click on your device you are presented with the pages
    Summary
    Info
    Apps
    Tones
    Music
    Movies
    TV shows
    Books
    Photos
    To remove Audiobooks depending on the type of Audiobook ie a series of mp3 files you will find under music and probably have to deselect the album name to remove it. I don't have any of these as I download from Audible or I use Audiobook Builder to stictch together mp3 files into m4b files. To find these Click on Books you will immediately see a section for books (in reality ebooks). Scroll down past that and you will see Audiobooks where you can select and deselect. Deselect the required Audiobooks and Click Sync

  • Can we add member directly in to dataforms with out editing dataform layout

    Hi All,
    i have a query regarding dataform can we add member in to dataform with out editing dataform layout .
    Member is already in dimension hirerachy . but in my scenario user want to add member directly to dataform with out editing its layout
    is it possible ? if its possible how please let know how it is possible.
    Thanks in advance please help me out
    Regards,
    SM

    You can add row/column layout you can select: Allow users to dynamically add rows.
    It will "Enable users who have write access to the data form to dynamically change and refresh the data form’s definition by adding rows. Selected members that they can access display on the data form. You cannot simultaneously select Allow Users to Dynamically Add Rows and Suppress Missing Data. "
    Enabling Users to Add Rows:
    http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_admin/ch06s03s15.html
    Cheers..!!!
    PS: I can see that you have asked 8 questions are all of them are unresolved, its a good practice to mark the answers as correct or helpful, if you think they helped you and close the thread once your got your answers.
    Here are few Ex:
    hyperion planning
    hyperion planning workforce &capex
    Edited by: RahulS on Aug 17, 2011 6:09 PM

  • Can you create a button that adds specific text to a form field?

    Hi,
    I was wondering if it was possible to create a button in a PDF that, when clicked, adds specific text to a form field?
    I am trying to make a product catalogue where you click on a product button to add the product name or code to a form field.
    Each product in the catalogue will have a button and the more you click the more is added to the form field(s).
    Then when you have finished adding products to the form field(s) I want to be able to save and email the entire PDF as an order form.
    Any thoughts would be appreciated!
    Cheers,
    Jim

    Yes, it's possible. The most simple version of such a script will be something like this (used as the button's MouseUp event):
    var v = this.getField("Products");
    if (f.value!="")
         f.value += ", ";
    f.value += "Product1";

  • Photos are dark and cannot be used in slideshow mode.  Also cannot move photos in a sequence.  Also photos will not move from grid to add to another collection.

    Lightroom 4, photos are dark when in slideshow mode.  Therefore, cannot create a slideshow.  Cannot move photos from grid to add to another collection.  Also cannot change sequence of photos.  Have searched multiple  times for troubleshooting help online with no resolution available.

    Just to clarify my problem with the "dark photos"....when in slideshow mode, photos are dark and state "no photo selected"  I've created multiple slideshows and this was never an issue.  Just downloaded updates as well for Lightroom 4 and this didn't seem to help either.

  • Custom master page branding is missing buttons to add Web Parts

    I've created a custom master page which does not display the "add" or "cancel" buttons when adding web parts to the page. These elements are controlled by CSS tags such as: .ms-wpadder, .ms-wpadder-cell, .ms-wpadder-buttonArea, .ms-wpadder-zoneArea, #s4-ribbonrow
    among others. I have attached a screenshot on my SkyDrive account
    SharePoint Master Page Screenshot
    which displays the web part objects but not the buttons to add them to your page. The cells of the #s4-ribbonrow are red .ms-wpadder-cell have been colored orange for display purposes. Here is some code I am experimenting with to solve the problem
    #s4-ribbonrow{background-color:red !important; padding-bottom:50px !important;min-height: 43px; max-height:200px; overflow-y: hidden;}
    .ms-wpadder-buttonArea .ms-wpadder-zoneArea{padding-bottom:50px; background-color:aqua;}
    .ms-wpadder-cell{min-height:220px !important; background-color:orange;}
    .ms-wpadder{padding-bottom:50px !important;}
    #RibbonContainer{background-color:transparent;}
    body #s4-ribboncont{background-image:none; padding-top:150px;}
    Alex Dove - MA, MCP, SharePoint certified developer

    Hi Pivotal,
    I think you use other style, because I apply your style on v4.master but this hide all ribbon
    panels, anyway I think your issue related with  
    body #s4-ribboncont
    padding-top: 150px;
    Try to decrease or remove padding-top.
    Hope that helps a little
    Regards,
    Senior Sharepoint Developer [email protected]

  • How do you enable 'Create Content' button on 'Add Content' page?

    How do you enable ‘Create Content’ button on ‘Add Content’ page?
    There is new functionality to a ‘Layout’ type personalization page like ‘Sales Dashboard’.
    Bug 4503123 INCONSISTENT WAY OF ADDING USER-DEFINED REGIONS ON WYSIWYG PAGE:
    There’s no way to add custom content to a configurable page.
    Add a “Create Content” button and let the user create a piece of content that extends to a region he creates.
    It says: Fixed->11.5.10.3CU
    In Oracle® Application Framework Personalization Guide Release 11i Part No. B25439-02 it says:
    p 4-5
    If you personalize a non-configurable page (a page that does not have the necessary metadata to personalize its layout) or when you run your application in Accessibility mode (profile option Self Service Accessibility Features (ICX_ACCESSIBILITY_FEATURES) is set to Standard Accessibility), you will not see the Page Layout Personalization page, as shown below. Instead, you will see the Page Hierarchy Personalization page, page 4-12, where you can perform the same personalization functions, using a descriptive tabular user interface.
    It tried this and can’t get it to display.
    Has anyone run accross this before?

    user587952,
    Can you describe your issue in detail forgetting those references for the time being. What exactly are you trying to do?
    Check this from the dev guide:
    In order to be able to take full advantage of page layout personalization capabilities, it is important when you create your configurable page, to use flexibleLayout and flexibleContent regions at all levels when you create the page hierarchy structure under your page layout region. In Oracle Applications, this is required, as it is the coding standard.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Tables with buttons to add rows

    Morning
    I am having trouble with a table that has buttons to add, show and hide rows.  There are 2 rows in my table which I need to be able to add depending on which button is clicked.  I've managed to get the first button to add an instance using (Table.Row1.instanceManager.addInstance(1);) but I can't get row 2 to add to the bottom of the table with a button.  I've tried to amend the script to fit the second row but it doesn't work.
    Table.Row2.instanceManager.addInstance(2);
    I'd appreciate some help
    I can send a sample if need be.
    Many thanks
    Ben

    The correct syntax is addInstance(1) (or addInstance(true)).
    As long as the row is set to repeat (Object>Binding>Repeat Row for Each Data Item) it should work. If the row doesn't exist yet then try using the underscore shortcut for the Instance Manager: Table._Row2.addInstance(1);

  • How do you create a button to add a new form page to an existing form in Acrobat or Livecycle designer?

    Can someone tell me how to create a button to add a new form page to an existing form in Acrobat or Livecycle designer?

    In Acrobat forms you can use the 'template' object's 'spawn' metod. A Lesson in Templates for Adobe Acrobat by Dave Wrigtht

  • Jdeveloper 11.1.1.2.0 with ADF 11g.  add a adf button like ADD(+)

    Hi,
    I'm using jdeveloper 11.1.1.2.0 with ADF 11g.
    I'm display'g view object i.e, i drag some xxxvo1 from datacontrol and drop on jsf with from - i selected ADF form. Now i add a adf button like ADD(+) on top of the panel form.
    here when i fire Add button , i want to add the same set of input text box with label of ADF form i mean the above i have created ADF form.
    like
    ADF FORM
    + --> ADD BUTON
    EMPNO ________
    EMPNAME ______
    EMPDEPT ____
    when i fire "+" ADD BUTTON
    + -- > ADD BUTTON
    EMPNO ________
    EMPNAME ______
    EMPDEPT ____
    EMPNO ________
    EMPNAME ______
    EMPDEPT ____
    i hope above example give some idea.
    thanks in advace

    See the example code as below. I use the countries table from HR schema.
    <af:table value="#{bindings.CountriesRO1.collectionModel}" var="row"
    rows="#{bindings.CountriesRO1.rangeSize}"
    emptyText="#{bindings.CountriesRO1.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.CountriesRO1.rangeSize}"
    rowBandingInterval="0" id="t1" columnSelection="none"
    rowSelection="none" horizontalGridVisible="false"
    verticalGridVisible="false" contentDelivery="immediate"
    contextMenuSelect="false">
    <af:column sortProperty="CountryId" sortable="false"
    id="c2" >
    <af:panelFormLayout id="pfl1">
    <f:facet name="footer"/>
    <af:inputText value="#{row.bindings.CountryId.inputValue}"
    label="#{bindings.CountriesRO1.hints.CountryId.label}"
    required="#{bindings.CountriesRO1.hints.CountryId.mandatory}"
    columns="#{bindings.CountriesRO1.hints.CountryId.displayWidth}"
    maximumLength="#{bindings.CountriesRO1.hints.CountryId.precision}"
    shortDesc="#{bindings.CountriesRO1.hints.CountryId.tooltip}"
    id="it2">
    <f:validator binding="#{row.bindings.CountryId.validator}"/>
    </af:inputText>
    <af:inputText value="#{row.bindings.CountryName.inputValue}"
    label="#{bindings.CountriesRO1.hints.CountryName.label}"
    required="#{bindings.CountriesRO1.hints.CountryName.mandatory}"
    columns="#{bindings.CountriesRO1.hints.CountryName.displayWidth}"
    maximumLength="#{bindings.CountriesRO1.hints.CountryName.precision}"
    shortDesc="#{bindings.CountriesRO1.hints.CountryName.tooltip}"
    id="it1">
    <f:validator binding="#{row.bindings.CountryName.validator}"/>
    </af:inputText>
    <af:inputText value="#{row.bindings.RegionId.inputValue}"
    label="#{bindings.CountriesRO1.hints.RegionId.label}"
    required="#{bindings.CountriesRO1.hints.RegionId.mandatory}"
    columns="#{bindings.CountriesRO1.hints.RegionId.displayWidth}"
    maximumLength="#{bindings.CountriesRO1.hints.RegionId.precision}"
    shortDesc="#{bindings.CountriesRO1.hints.RegionId.tooltip}"
    id="it3">
    <f:validator binding="#{row.bindings.RegionId.validator}"/>
    <af:convertNumber groupingUsed="false"
    pattern="#{bindings.CountriesRO1.hints.RegionId.format}"/>
    </af:inputText>
    </af:panelFormLayout>
    </af:column>
    </af:table>

  • Add member in Distribution List from Sql file or Sql Server

    Hi 
    I want to add member in Distribution List in MS Exchange 2010 using MS Sql Database file
    How to create connectivity between MS SQL file and MS Exchange 2010 ?
    and manage DL also add and remove member from DL?

    The answer to your question depends on the version of SQL Server and Exchange you are running.  If you have Exchange 2007 or higher, and if you have SQL Server 2010 or higher, you can load support for both in a PowerShell session.  Otherwise, you
    will need to write an application to join the two.  It may be simplest to schedule a flat-file dump from your SQL Server database, and use that to pull DL membership into Exchange - I know several third party corporations that have done this for their
    Exchange 2003 (and earlier) management add-ons.
    And before you ask, it would take too much time for me to explain how you would need to connect to and interact with the SQL Server database using PowerShell (or how to dump a flat-file from it, for that matter) for me to do it here.  I suggest you
    search the web for SQL Server PowerShell or SQL Server export
    for that information.
    Once you have the information from SQL Server, it's a simple task to run Add-DistributionGroupMember to add members and Remove-DistributionGroupMember for DL membership management.  I'll caution you, though - if you are going to do massive updates to
    a large distribution group, it would probably be faster to use DL management in AD.  The reason for this is that you can add or remove several group members at once using the AD toolset, but you can only work with individual members with the above Exchange
    commands.  And working with individual members means enumerating the entire group membership for each update - and with large groups, this takes a lot of time.

Maybe you are looking for

  • NI_CAN (0xBFF62002) internal error occurs in the NI-CAN driver

    After I generated the installation kits then  Suddently I cannot run my program any more. Please see the attached nicanErr.txt. Attachments: nicanErr.txt ‏3 KB

  • How to set default view in Adobe Reader 9?

    I am trying to figure out how to set adobe reader so that when you open a document you automatically get the page view on the right side come up and the document in full mode.  I have researched registry edits and also the customize wizard with no lu

  • Photoshop cs2 disc will not install

    I had Photoshop CS2 installed on my old iMac, which recently crashed, so I purchased a new MacBook Pro. I used Time Machine to transfer all my data from my 2006 iMac to my new MacBook Pro. Transfer of data was successful, except for Photoshop CS2, wh

  • Dead Computer

    My computer died that I had my phone connected to, the applecare is done and I'm not going to take it in for service I'll just buy a new iMac or a MacBook. My question is what happens to all my music that I synced through iTunes and how do I de autho

  • Orchestra Instruments for GB3 on Intel

    Alas, Garritan Personal Orchestra is dead on my Intel iMac using GB3. This will give me some time to explore other possibilities. Has anyone used or heard a demo of ClassicalBoomBox? Besides JamPack 4, which sounds awful, does anyone know of any orch