APEX4: Populating fields from database based on the SelectList value

Hi,
I've a Select List and 4 Text Fields on a form. On selecting a value on the Select List, I've to populate the Text Fields by fetching its values from the database by using the Select List value as the primary key.
How can I do this in APEX 4?
Thanks for the help.
--Hozy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Thank you so much for helping me out.
Yes, it comes from the same table account.
These are the sqls to fetch the 4 values in each dynamic action:
select a.address1 from account a where a.account_id = :P14_ACCOUNT
select a.address2 from account a where account_id = :P14_ACCOUNT
select a.city from account a where a.account_id = :P14_ACCOUNT
select a.postal_code from account a where a.account_id = :P14_ACCOUNT
Right now, I only have one dynamic action for text field P14_BILLING_ADDRESS_1, and even for just one the value is not showing up in it. Please note that when I added for dynamic actions, the the values were showing up in all the 4 text fields before.
Then when I added 4 more dynamic actions for a different Select List (P14_CUSTOMER), but for the same text fields, it all stopped working. And now even a single dynamic action is not working. This is how the sql for next 4 dynamic actions looked like:
select c.address1 from customer c where c.customer_id = :P14_CUSTOMER
select c.address2 from customer c where c.customer_id = :P14_CUSTOMER
select c.city from customer c where c.customer_id= :P14_CUSTOMER
select c.postal_code from customer c where c.customer_id= :P14_CUSTOMER
}

Similar Messages

  • Populating fields from database values

    I have a page being populated from database values. I used the Application Builder Wizard to create the application. One of the fields is displaying on the report, but when I click edit, the value is not there. The field is defined as a float and being displayed as a text item. I have created this Application twice with the same results.
    Any ideas?
    thanks!
    Christie

    Thank you for the quick reply!
    I turned on the debug, to ensure the automatic fetch
    process it on and it is. The edit page has 7
    fields, all are being populated except for this one.
    I have confirmed it is using the correct database
    column and it is replacing the existing value the
    same as the other fields.
    Any other ideas to what could be going on?You can see each page item assignment in the debug output. Look there to see where the page item is being set, and potentially unset I suppose. The thing to look for here might be page processes that might be interacting with that item.
    You could also simply drop the problematic page item and recreate it to see if you can make the value stick.
    Earl

  • Populating Fields from Database

    Hi everyone,
    Need some help from the experts.  I have a PDF form that is already connected to a Progress/OpenEdge database through ODBC connection.  Here's what I want to happen:
    Just as an example, in the database suppose the 'Job' table contained 3 fields: JobID, JobDescription, and CustomerName.  When a user enters a job number into a specific PDF form field which corresponds to the JobID field of the database, the form fields in the PDF for Job Description and Customer Name auto-populate with the corresponding information from the database.
    Can this be done?
    Thanks so much,
    Jon

    Thank you for the quick reply!
    I turned on the debug, to ensure the automatic fetch
    process it on and it is. The edit page has 7
    fields, all are being populated except for this one.
    I have confirmed it is using the correct database
    column and it is replacing the existing value the
    same as the other fields.
    Any other ideas to what could be going on?You can see each page item assignment in the debug output. Look there to see where the page item is being set, and potentially unset I suppose. The thing to look for here might be page processes that might be interacting with that item.
    You could also simply drop the problematic page item and recreate it to see if you can make the value stick.
    Earl

  • Fetch records from Database based on Input value

    Hi Experts,
    In my mobile application, I have designed one input field with F4 help or input assist. I need to fetch records from database based on that input and need to display records in table.
    My question is:
    How to fetch the records from database/back end based on the input value and display them as table format as we are doing in SAP ABAP?
    Here, I need to fetch the records based on input value available in the UI screen and pass that value to gateway, fetch the records from database and need to bind with table in SAPUI5.
    Kindly share the whole process flow with sample code for this requirement. Hope I have explained the requirement in detail.
    Thanks In Advance..
    Regards,
    Arindam Samanta.

    Hi,
    Try something like this.
    In this, I am passing From date, To date, RelGrp, RelStr, Uname as input. Then I am storing those values in variables and passing this data in Odata request.
    OData.read({ requestUri: "http://xxxx:8000/sap/opu/odata/sap/Z188_PO_SRV/pos?$filter=Docdate le datetime'"
                    + todateformat+"T00:00:00' and Docdate ge datetime'"
                    + fromdateformat+"T00:00:00' and RelGrp eq '"
                    + relcode +"'and RelStr eq '"
                    + relstg +"'and Uname eq '"
                    + username+ "' "},
      function (data) {
    console.log(data);
    When we are giving correct inputs it will goes to Success function and get the data from back end.
    In console we can see the data.
    Hope this will helps to you.
    Thanks&Regards
    Sridevi

  • How to populate a field from database through personalization

    I need to populate value of a field from database on self service transaction web page. This field is not configured as EIT or SIT, nor available in seeded transaction.I need to know abt creating some item through personalization where i can write a query . This item will execute the query and display the returned value on the page or something on the similar line.
    Thanks in advance,
    Tanveer

    This workaround should be used as a one time approach till you move to 11.5.10 CU3.
    Here are the details,
    You just need to add the following tags inside the site or function level customization document, remember it should be either site or function only no other levels are supported for adding a new item.
    before adding the following tags you need to find out the following details,
    1. what is the last item in the advancedTable, column or columnGroup in the base metadata. Do not conside the columns inside the columnGroups for this, just the last item which might be a column or a columngroup. Get the if of that item.
    2. You should know what is the view instance and viewattribute you will be attaching
    3. Remember you can only add columns through personalization and not columnGroups.
    4. Replace the appropriate values for the properties amrked with {...} with your own values. You can change the other properties to reflect any specific requirement you want. Make sure you provide correct values.
    <insert after="{the id you got from step 1}">
    <oa:column id="{yourid}" adminCustomizable="true" bandingShade="none"
    cellNoWrapFormat="false" columnDataFormat="textFormat" displayGrid="true"
    rendered="true" scope="." totalValue="false" userCustomizable="false"
    xmlns:oa="http://xmlns.oracle.com/oa">
    <ui:columnHeader xmlns:ui="http://xmlns.oracle.com/uix/ui">
    <oa:sortableHeader id="{yourid}" adminCustomizable="true"
    cellNoWrapFormat="false" initSortSeq="none" prompt="{your prompt}"
    rendered="true" required="no" scope="." sortState="no"
    userCustomizable="false"/>
    </ui:columnHeader>
    <ui:contents xmlns:ui="http://xmlns.oracle.com/uix/ui">
    <oa:messageStyledText id="{yourid}" adminCustomizable="true"
    cellNoWrapFormat="false" dataType="VARCHAR2" initSortSeq="none" queryable="false" rendered="true" required="no" scope="."
    selectiveSearchCriteria="false"
    serverUnvalidated="false" sortState="no" tipType="none" totalValue="false"
    userCustomizable="false" vAlign="middle" viewAttr="{your view attribute}" viewName="{your view instance name}"
    warnAboutChanges="true"/>
    </ui:contents>
    </oa:column>
    </insert>
    You can insert these tags at the end of any existing tags within the <modifications>
    </modifications> tag in the document.

  • Missing class indicator field from database row

    Hi,
    I have following problem :
    There is a class inheritance with root interface and 4 subclasses, they are initialized with class indicator field. If I use ReadAllQuery with an interface or some of concrete class as search class - it is working perfect, but if I try to build query with custom selected fields (addPartialAttribute) I always get an error - Missing class indicator field from database row.
    AFAIK This field have not to be mapped in Workbench to real table column, how can I tell TopLink that I will read this indicator field too by reading some custom fields ? I thought TopLink reads such fields automatically, like it does it with primary keys.
    Thank you
    Maksim

    This sounds like an issue with our partial attribute queries and inheritance as the type indicator column must always be read. Can you map the type indicator to a read-only attribute (mark mapping as read-only) and include this in your list of attributes as a work-around?
    Doug

  • Want JTree e.g. of populating data from database.

    I want ur JTree example of populating data from database, can u plz give me that eg.?
    Awaiting 4 ur reply.

    Hi,
    AFAIK, there is no direct approach to populate a JTree directly from a resultset. However, JTree can use a DOM tree as its model by using the adapter pattern. The procedure to do this is well-documented in the SUN website and the link is provided below. The code to convert a resultset to XML is provided below:
    protected void resultSetToXML(OutputStream out,
    ResultSet rs,
    String stylesheet)
    throws IOException, ServletException {
    // Create reader and source objects
    SqlXMLReader sxreader = new SqlXMLReader();
    SqlInputSource sis = new SqlInputSource(rs);
    // Create SAX source and StreamResult for transform
    SAXSource source = new SAXSource(sxreader, sis);
    StreamResult result = new StreamResult(out);
    // Perform XSLT transform to get results. If "stylesheet"
    // is NULL, then use identity transform. Otherwise, parse
    // stylesheet and build transformer for it.
    try {
    // Create XSLT transformer
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer t;
    if (stylesheet == null) {
    t = tf.newTransformer();
    } else {
    // Read XSL stylesheet from app archive and wrap it as
    // a StreamSource. Then use it to construct a transformer.
    InputStream xslstream = _config.getServletContext().
    getResourceAsStream(stylesheet);
    StreamSource xslsource = new StreamSource(xslstream);
    t = tf.newTransformer(xslsource);
    // Do transform
    t.transform(source, result);
    } catch (TransformerException tx) {
    throw new ServletException(tx);
    The classes SQLXMLReader and other classes used in this example are available in the following java packages.
    import java.sql.*;
    import javax.sql.DataSource;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.sax.*;
    import javax.xml.transform.stream.*;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.AttributesImpl;
    The following is the link that explains how to load a JTree from DOM.
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM6.html
    Cheers,
    vidyut

  • Jasper report on HTML when one image loaded from database and for the other

    How to generate jasper report on HTML when one image loaded from database and for the other we give a image path
    My code
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
              exporter = new JRHtmlExporter();
              exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
              exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);
              exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, strImageInputDirectory);
         exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, strImageOutputPath == null ? "." : strImageOutputPath);
         exporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.TRUE);
         exporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
         exporter.setParameter(JRHtmlExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
              exporter.exportReport();
              byte[] bdata = ((ByteArrayOutputStream) baos).toByteArray();
    Can any one help pls
    Message was edited by:
    ameet.au

    hey sorry for posting it in this forum.
    but do u have sample code for making it work.. since i am able to do it on PDF format(image from Database and another stored in the webserver) using
    byte image[] =(byte[]) outData.get("image");
                        ByteArrayInputStream img = new ByteArrayInputStream(image);
                        hmimg.put("P_PARAMV3", img);
    print = JasperFillManager.fillReport(reportFileName, hmimg, jrxmlds);
    bdata= JasperExportManager.exportReportToPdf(print);

  • Comparing fields from multiple entities in the same report (report builder 1.0)

    Created a model that contains 2 entities. I open that model in report builder 1.0.  When I drag a field from one of the entities into the design area, i can no longer see the other entity or use any of the fields from that other entity. 
    I need to use fields from both entities in the same report (join tables).  In management studio i would simply write a query and join tables but i cannot figure out how to do this in report builder.  Once i select a field from one entity
    how do i select fields from more than one entity and drag them into the same report.

    Would it be possible for you to send me instructions for this? I am not that familiar with SQL coding but I can definitely figure it out. I have been wanting to get information on reports from multiple entities for a very long time! The only way I can
    currently do it is have our document management software people write the report for me for quite a large fee. I would much rather do this myself. Right now I can select a few fields from one entity (the main one), some from a second entity under that one,
    but I cannot add any fields from a third entity! Quite annoying and hindering! Thank you :)

  • Using Shading Dictionary to perform shading in pdf,before that the shading dictionary call from Pattern Dictionary.In the Pattern Dictionary there is an Matrix based on the matrix value  location the shading operatihow the axial shading is preserve in pdf

    using Shading Dictionary to perform shading in pdf,before that the shading dictionary call from Pattern Dictionary.In the Pattern Dictionary there is an Matrix based on the matrix value  location the shading operation is perform,So i dont know how to calculate value of pattern Dictionary matrix value.
    10 0 obj
    << /Type /Pattern
    /PatternType 2
    /Shading 11 0 R
    /Matrix [1.00 .00 .00 1.00 54.00 53.00]  // the matrix value how to calculate
    >>
    11 0 obj
    <<
    /ColorSpace /DeviceRGB
    /Function 12 0 R
    /ShadingType 2
    /Coords [109.2726 69.00 109.2726 .00]
    /Extend [true true]
    >>
    12 0 obj
    <<
    /FunctionType 0
    /Domain [.00 1.00]
    /Range [.00 1.00 .00 1.00 .00 1.00]
    /Size [1002]
    /BitsPerSample 8
    /Length 3006
    >>
    stream
    here is an stream of colors
    endstream
    endobj
    Can anybody help me please.
    Regards, Sasi kumar sekar.

    Hi, Sasi -
    The Matrix maps coordinates in your shading dictionary into User Space. That is, the Matrix entry in the Pattern dictionary specifies a coordinate transformation that will be applied to coordinates specified in the shading dictionary.
    To take your example, you have an axial shading extending from (rounding off) 109,69 to 109,0.  Your Pattern dictionary specifies the Matrix
    [ 1  0  0  1  54  53 ]
    This transformation matrix corresponds to a scale of 1,1 (that is, no change in scale) and a translation of 54,53. Thus, the actual endpoints for the axial shading will be the User Space positions 163,122 and 163,53 (assuming I’ve added correctly).
    As to what values to use for your Matrix, it depends on how you’ve set up your Shading dictionary. If the coordinates you’ve specified are actually where you want the gradient to go, then just use an identity matrix
    [ 1  0  0  1  0  0 ]
    By the way, are you sure that the Pattern dictionary includes a Matrix entry? I seem to remember (it's been a while since I've looked at Patterns) that the matrix is supplied as an argument to the makepattern operator:
    <<patternDict>> [ 1 0 0 1 0 0 ] makepattern
    Hope that helps.
    - John Deubert
      Acumen Training
      PostScript and PDF
      Training & Consulting

  • Oracle JMS Adapter - Bpel Pick message from AQ based on the correlationId?

    Hello,
    I'm experiencing an issue during pricking the messages from AQ based on the JMSCorrelationID in Asynchronously.
    I've developed asynchronous BPEL services, which will post messages in AQ (Inbound), the same service will liston response from Out queue.
    Currently my service is consuming all messages, i want to consume only relevant response message based on the correlation Id.
    Could you please advise me?
    Regards,
    Paddy.

    Thanks MaShek for your replay,
    During process invocation I've generated guid and set this value to JMSCorrelationID property which will set as message corrlationID, same JMSCorrelationID coming in response as well, I've set on message property same JMSCorrelationID which I set in invocation.
    If same message response comes then the pick activity is working fine that means consumed message and correlation correctly, but other messages also consuming and then rejecting message. I want to restrict this.
    Only relevant correlationid messages need to pick and process.
    If any suggestions appreciated.
    Note: I'm using Jdev11.1.15,
    Regards,
    Paddy

  • How to set a default value for a drop down list box and then apply cascading based on the default value in Infopath 2010.

    Hello Everyone
    I have two drop downs. Both are coming from look up fields from two lists. i want to set a default value(first list item) for the first drop down list box and then apply cascading based on the default value for the next drop down list box. I found one article(http://www.bizsupportonline.net/infopath2010/display-first-item-drop-down-list-box-infopath-2010.htm)
    where in i can set a default value but i can't apply cascading based on that default value. Any suggestions would be highly appreciated.
    Thanks
    Ramanjulu Naidu N

    Hey Ramanjulu,
    Take a look at the below article which I believe will answer your question.
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Daniel Christian (MCTS)

  • Delete in database based on multiselect list values

    Hi,
    I have a selectlist in Apex and a function in the database to do some delete based on the selected value from the select list.
    FUNCTION delete_batch (v_batch VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    IF v_batch like 'M%'
    THEN
       RETURN ('A monthrun cannot be deleted');
    ELSE
       DELETE FROM so_disco_pa
       WHERE  batch = v_batch
       DELETE FROM so_batch_pa
       WHERE  batch = v_batch
       COMMIT;
       RETURN ('Batch '||v_batch||' has been deleted');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
        RETURN ('Batch could not be deleted');
    END delete_batch;The package function is called when the delete button is clicked with following process:
    BEGIN
    DECLARE
    x   varchar2(100);
    BEGIN
    x := pa_control.delete_batch (:P3_BATCH);
    :F105_MESSAGE := x;
    END;
    END;Now I want to change the selectlist to a multiselect list so that multiple batches can be deleted.
    How do I change my procedure and process to delete batches based on the selected values?
    Thanks,
    Diana

    I got this so far, but only the first batch selected in the list is being deleted. The other selected batch values are not deleted.
    Some help please.
    FUNCTION delete_batch (v_batch VARCHAR2) RETURN varchar2
    IS
    T Apex_application_global.vc_arr2;
    BEGIN
    T := apex_util.string_to_table(v_batch);
    For I in 1..t.count loop
    IF  t(i) like 'M%'
    THEN
       RETURN ('A monthrun cannot be deleted');
    ELSE
       DELETE FROM so_disco_pa
       WHERE  batch = t(i)
       DELETE FROM so_batch_pa
       WHERE  batch = t(i)
       COMMIT;
       RETURN ('Batch '||v_batch||' has been deleted');
    END IF;
    end loop;
    EXCEPTION
    WHEN OTHERS THEN
        RETURN ('Batch could not be deleted');
    END delete_batch;

  • Is there a way to hide some reports based on the selected values in prompt.

    Hi Experts,
    Is there a way to hide some reports based on the selected values in prompt.
    For ex. if a year is selected in the prompt then the report should display year wise report.
    If a year and half year both are selected in the drop down from prompt section then 2 reports should come.. One for year wise and another for half year wise.Kindly look into this.
    Regards
    Ashish

    Hi,
    Use presentation values in prompts for year,half,qtr and month.Example- For year-y is presentation variable in the same way for halfyear-h,qtr-q and month-m.
    create four intermediate reports.Example-Report r1 with only year column,r2 with only halfyear column,r3 with qtr column and r4 with month column.
    Make column in each report(r1,r2,r3,r4) is equal to their presentation variables(y,h,q,m).
    Use four sections.
    Section1-Place report that should come when only year.
    section2-Place report that should come for year and halfyear.
    Section3-Place report that should come for year,halfyear and qtr.
    Section4-Place report that should come for year,halfyear,qtr and month.
    Apply guided navigation for each section selecting guided navigation-
    For section1-
    properties->Guided navigation->check this Reference Source Request(Yes)->select report r1(year)->check this Show Section(if request returns row)
    In the same way do for remaining section2(select r2),section3(select r3) and section4(select r4)
    Thanks,
    Srikanth
    http://bintelligencegroup.wordpress.com/

  • Setting the series color of a bi beans graph based on the data values

    How do I conditionally set the series color of a bi beans graph based on the data values?
    I am using the following code to get the data values and set the series color:
    Graph gr=(Graph)CmdrDashboardP1_pres1.getView();
    DataAccess da=gr.getGraphModel().getDataAccess();
    DataDirector dd=gr.getDataDirector();
    DataMap dm=dd.getDataMap();
    int re=dd.ROW_EDGE;
    int ce=dd.COLUMN_EDGE;
    Object val=da.getValue(re,ce,dm.DATA_TYPE);
    int seriesCount=da.getEdgeCurrentSlice(DataDirector.ROW_EDGE);
    if (val <=45.0)
    gr.getSeries().setColor(new Color(255,0,0),seriesCount);
    I get a NullPointerException from the line of code "Object val=da.getValue(re,ce,dm.DATA_TYPE)." I have tried the code with DATA_UNFORMATTED as well, but get the same exception. When I print the DataMap value of dm the results are [dataUnformatted, dataViewFormat, value, dataIsTotal, dataType].
    Also, I get the error "method <= (java.lang.Object,double) not found in class _CmdrDashboardP1" from the "if (val <=45.0)" code.
    Thanks for any assistance

    How do I conditionally set the series color of a bi beans graph based on the data values?
    I am using the following code to get the data values and set the series color:
    Graph gr=(Graph)CmdrDashboardP1_pres1.getView();
    DataAccess da=gr.getGraphModel().getDataAccess();
    DataDirector dd=gr.getDataDirector();
    DataMap dm=dd.getDataMap();
    int re=dd.ROW_EDGE;
    int ce=dd.COLUMN_EDGE;
    Object val=da.getValue(re,ce,dm.DATA_TYPE);
    int seriesCount=da.getEdgeCurrentSlice(DataDirector.ROW_EDGE);
    if (val <=45.0)
    gr.getSeries().setColor(new Color(255,0,0),seriesCount);
    I get a NullPointerException from the line of code "Object val=da.getValue(re,ce,dm.DATA_TYPE)." I have tried the code with DATA_UNFORMATTED as well, but get the same exception. When I print the DataMap value of dm the results are [dataUnformatted, dataViewFormat, value, dataIsTotal, dataType].
    Also, I get the error "method <= (java.lang.Object,double) not found in class _CmdrDashboardP1" from the "if (val <=45.0)" code.
    Thanks for any assistance

Maybe you are looking for