Reorder checkbox based on LOV

Awkward customer, well not really! A client has requested that a few pages that list options via checkboxes are ordered differently. In some cases I have 60 checkboxes or so in three or four columns ordered alphabetically. APEX does this fine, ordering by column then row; the client wants row by row. I can do this using SQL but it is awkward when I am hoping there is a way of doing it that might be easier?
Currently
1 2 3
4 6 7
8 9
Desired
1 4 7
2 5 8
3 6
Phil

Phil,
Try the mod function. For the example above:
"order by mod(rownum + number_of_columns, number_of_columns + 1), rownum".
Number of columns in this case would be 3.
Here is a simple query:select y.a result
  from (select x.a, rownum rn
          from (select 'a' a
                  from dual
                union
                select 'b' a
                  from dual
                union
                select 'c' a
                  from dual
                union
                select 'd' a
                  from dual
                union
                select 'e' a
                  from dual
                union
                select 'f' a
                  from dual
                union
                select 'g' a
                  from dual
                union
                select 'h' a
                  from dual
                union
                select 'i' a
                  from dual
                union
                select 'j' a
                  from dual
                union
                select 'k' a from dual) x) y
order by mod(y.rn + 3, 4), y.rnand the result isRESULT
a
e
i
b
f
j
c
g
k
d
hHope this helps
Jure

Similar Messages

  • Display as text (based on LOV) not working

    hi --
    I've not used this kind of item before, so there's probably some really simple thing I'm missing....
    Have the LOV:
    select objecttype_name display_value, objecttype_id return_value
    from hdb_objecttype_syn order by 1
    Return value is going into page item :P3_objecttype_id (a popup LOV). Have another item, :P3_objecttype_name, which is a display as text (based on LOV) item. When/how is this item supposed to get populated? When I select a value from the LOV, I'd expect the text item to be set to the display value of the LOV, but it is always []. The source type of :P3_objecttype_name is Sql Query, and the query is:
    select objecttype_name from hdb_objecttype
    where objecttype_id = :P3_objecttype_id
    Does the page have to be submitted before the display item is populated? Seems like that wouldn't be very helpful...
    Thanks,
    C

    HI Varad -- I'm afraid I'm new enough to all this to not know how to implement either of your solutions... and that's after scanning the forum for additional info.
    How do I get the page to submit? Is there any way to do this w/o forcing the user to explicitly press a button? (which would be way too much, as there are probably 10 LOVs on this page).
    If I choose to use javascript, 1) on what item and under what attribute do I put the script (is it on the objecttype_name that needs to be populated?), and 2) where can I find an example of what this might look like? I'm not familiar w/ it at all.
    My goal is ultimately to have an LOV that displays both the key value and the name (which I guess can be accomplished by concatenating those together in the LOV select statement), to return the name to the page, and then have the ID automatically filled in to match the key (the example I sent you is backwards, simply because I started building this page w/ only key values displayed, added the name as a test later.) And, I also want the user to be able to type in the ID (no LOV would be attached to it), and have the name automatically populated. I'm guess this could be accomplished in a way similar to having the name filled in after the value is chosen from the LOV... If I can just figure out how to do that!
    Thanks,
    Carol

  • Select List (based on LOV) query problem

    Hello experts! I have a small problem here, which I can't seem to overcome.
    I have a page item (select list based on LOV), which is based on a query. The query returns all potential employees of a department that are responsible for a certain duty. So far so good!
    The problem is that there are two departments, which should not only see there own employees but also the name of the employee that has carried out a certain task. However, due to my query, the name of that person is not displayed - only the pk is returned.
    Do you have a recommendation how I display all employees of a specific department and have additional values translated as well?
    My query is as follows: select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where cnt_bearbeiter in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK) union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user)) whereas :app_user holds the information of the department.
    Any hint is appreciated!
    Many thanks,
    Seb

    Okay, I just had the right idea and it's working well! Sorry for posting!
    I return the name of the employee that has edited a dataset and simply add all others of the logged on department! Really easy! Should have thought of that before posting! ;-(
    The correct code is select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter a, vt_tbl_punktdaten b where a.cnt_bearbeiter = b.int_bearbeiter and
    inv_pt_id_sub = :P4_PTIDS
    union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
    CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user))Bye,
    Seb

  • Column based on LOV in a classic report

    In a classic report i want to display a value coming from an lov, based on the value of a column. I can't seem to make this work however, not even on apex.oracle.com. I too am on apex 4.1.
    What i've tried is to set the column to display as text, based on lov. I've tried named static and dynamic lovs, and tried to supply an own lov definition, both static and dynamic. Even apex_item doesn't seem to work.
    As a test, i has set this up on apex.oracle.com:
    Classic report:
    Region source:
    select status, descr, apex_item.text_from_lov(status, 'lov_status') status2
    from
    select 15 status, 'test for status 1' descr from dual
    union all
    select 30 status, 'test for status 2' descr from dual
    union all
    select 45 status, 'test for status 3' descr from dual
    Column attributes for column status:
    Display As: Display as Text (based on LOV, does not save state)
    List of Values -> Named LOV: LOV_STATUS
    LOV_STATUS (shared components -> lists of values):
    this is a static lov, with these values:
    15;'Status One'
    30;'Status Two'
    45;'Status Three'
    60;'Status Four'
    (which could also be used as a non-named lov like: STATIC2:15;'Status One',30;'Status Two',45;'Status Three',60;'Status Four')
    Both column status as status2 simply keep displaying their value, and not the 'display value' i'd expect coming from the lov.
    I could use decode or case, yes. But using an lov keeps it cleaner, especially when there are more than 3 or 4 values, and could be reused in more reports.
    Am i using or doing this wrong?

    Hi Tom,
    revert the order of your LOV items ( so first description and then ID ),
    like for example :
    STATIC2:'Status One';15,'Status Two';30,'Status Three';45,'Status Four';60
    That does the trick ( tried it ).
    If you want to see an example check page 2 of the only app on apex.oracle.com
    WS : bklerk
    User : demo
    PWD : demo123
    Regards
    Bas

  • Bug: Report Column based on LOV character string buffer too small error

    When using a column type of "Display as Text (based on LOV, does not save state)" with a result set that is rather large causes a character or string buffer too small oracle error.
    See the below page for an example.
    The example page below has a single report off a table called "HUGE_TABLE" which has two columns: display and code
    Code contains a number between 0 and 100000.
    Display contains the number in code appended to a block of text.
    When I display the report with no Display As Text (based on LOV does not save state) it displays fine.
    If I make the "Code" column display as text based on LOV and make the LOV
    "SELECT display, code FROM huge_table"
    I get the error you see on the page.
    http://apex.oracle.com/pls/otn/f?p=32149:1
    Thanks.

    Thanks for your help Scott.
    So from what I've gathered from my own tests and the discussions you linked me to the LOVs based on SQL queries are being converted into "static LOV" strings before being used.
    As such they are limited to the PL/SQL VARCHAR2 max size of 32767
    Which means given the static reduction of the string 'STATIC:' that we have 32760 characters left.
    Which is where your SUM( LENGTH( display ) + LENGTH( return ) + 2 ) comes in.
    In short, if:
    sum( length( display ) + length( return ) + 2 ) + 7 > 32767
    would evaluate to true then you have a problem. :)
    I'll use this to track down my problems and switch them over to inline queries.
    Thanks.
    Cheers,
    Joe

  • Urgent - Report Column based on LOV - Value not found in LOV

    Hi All,
    Recently, we have upgraded to HTMLDB 2.0 from HTMLDB 1.5.
    I have a SQL report. One of the columns is based upon LOV - Display as Text (Based on LOV, does not save state).
    For the "Ids" of the report, it should display the corresponding "Names" from the LOV.
    But, for the cases, where no record exist in LOV for some Id, then it is directly showing the Id instead of "-" (which i have specified in Display Null Text) in the report column attributes.
    Before upgrade, it was working fine.
    Any idea where is the issue.
    Please help.
    Thanks in advance,
    Monika

    Hi,
    Can anybody help me in sorting out this issue please.
    For your reference, i have made a test case on
    http://apex.oracle.com/pls/otn/f?p=20451:4:3519837362944582:::::
    Here, there are 2 tables
    1. MY_EMP_COUNTRY(emoid, empname, cntry_id)
    2. MY_COUNTRY_LOOKUP(id, name,active)
    LOV is created on table 2
    select name d, id r
    from my_country_lookup
    where active = 'Y'
    And, on the page a SQL report is created
    select empname, cntry_id
    from my_emp_country
    where, cntry_id is based upon the LOV.
    Since, in lookup table, cntry_id = 4 is set inactive, it is not picked up by the LOV and hence on the report instead of showing the NULL text it is showing the cntry_id (4).
    The attributes of report column cntry id -
    Named LOV = CNTRY_LOV
    Display Null = YES
    NULL text = -
    Display Extra Value = YES
    Am I missing anything.
    thanks,
    Monika

  • Report "Display Text (Based on LOV)" columns don't like colons - Bug?

    This is a bit hard to explain in text, so I've built a sample app: http://apex.oracle.com/pls/otn/f?p=9608:1
    The app has two pages, which demonstrate two related bugs in the handling of Report "Display as Text (based on LOV)" columns.
    Basically, if the LOV query returns a string that contains colon characters (":") in the display column, the values are matched up correctly, but the colons are stripped from the display.
    If the LOV query returns a string that contains colon characters in the return value column, then the matching fails entirely.
    Removing the colon characters eliminates the problem.
    We actually ran into this in a production environment, after an upgrade from Apex 3.0.0 to 3.2.1. The behavior definitely did not occur in Apex 3.0, but was added at some point between the two versions.

    The colon is actually part of our data (the field in question is a URN namespace).
    And yes, I understand the function of the colon in Apex URL parameter passing. However, I wouldn't expect that sort of parsing to be used against the results returned from an LOV query.
    Also, the LOV is fine in of itself -- a select list based on the LOV displays & returns the expected values. It's only when I use a report column based on an LOV that this behavior creeps in.
    We've found a (fairly painful) workaround -- altering both the report query and the LOV query to to do something like replace(column, ':', '_') -- but that's a manual change to a large number of pages for us.
    This behavior is new to version 3.2.1. It didn't happen in version 3.0.

  • Dynamic action - show/hide region based on LOV which returns ID

    Hi folks,
    this should be simple, so someone who works with dynamic actions.
    I have a LOV which is based on below query:
    select OBJECT_ID, KOD
      from x_data x;
    retuns:
       ID          KOD
        492961 BMW
        492964 VOLVO
        492960 MERCEDES
        492963 VOLKSWAGEN
        492959 SKODAItem :P200_KOD is based on LOV which displays KOD and returns ID.
    On my page I have also 1 region called TEST_REGION.
    I would like to set up a dynamic action shich will SHOW/HIDE a TEST_REGION based on selected value in item :P200_KOD (LOV). Region should be showed if displayed (KOD) value of selected ID starts with 'V%'
    By other words, if below query returns any record, then SHOW, else HIDE:
       select *
        from x_data x
      where x.kod like 'V%'
         and x.object_id = :P200_KOD;How should I define a triggering condition for dynamic action, for item :P200_KOD?
    Thanks,
    Tomas

    Hi,
    One way:
    Create advanced dynamic action.
    Name : Hide region
    Event : Change
    Selection Type : Item(s)
    Items(s) : P200_KOD
    Condition : JavaScript Expression
    Value :
    $(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"Action : Hide
    Fire On Page Load : True
    Hide all page items on the same line : No
    False Action : Show
    Fire On Page Load : True
    Show all page items on the same line : No
    Selection Type : Region
    Region : TEST_REGION
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Dynamic bar chart based on LOV selected

    Apex 2.1 with XE : running on windows xp.
    I am trying to create charts based on selected criteria such as level 1, level 2 and level 3. If the user selects level 1 chart is expected to group level 2 and level 3 parameters else if the user selects level 2 criteria on top of level 1 then it should filter to the next category and so on. To make it simple I created three different queries which would generate the required graphs.
    To achieve this I decided to use PL/SQL function that would return three different chart queries based on the LOV selection. Although the function works well for each of the queries they dont work with a if else condition based on LOV selection. So what is the problem with creating such as dynamic query. Can I use the "%" values of LOV in my if else condition if not why ?
    Any alternatives ?

    Well. The queries for the charts run independently well. I guess I might be using the if else condition in an improper fashion.
    If the second LOV filter is not used.. I am matching the :LOV2 value with "%" and execute appropriate chart query based on single selection criteria and for the else case I use the other query and so on.
    I wish to show the code but since I upgraded to 3.0.1 today my application page views don't render properly. The images are missing ..and whole page is missing for editing.

  • Sorting report by column based on LOV problem...

    All,
    I have an issue with a report I have written.
    I have an LOV based on a sql where which returns an ID as a return value and a CODE as a display value.
    Lets say the LOV returns the following results:
    Return, Display
    1, V
    2, A
    3, T
    When I click on the item column heading to sort the report based on that column the records are in the order 1, 2, 3 and not A, T, V.
    So it looks like it is sorting the results based on the return value and not the display value.
    Is this a feature of displaying items based on LOVs in reports and then sorting on them or am I missing something.
    Hopefully, someone can help me out here as it is driving me mad.
    Regards
    ChrisR

    Chris,
    This didn't change in 3.1 and that is definitely not a bug but a feature. The solution I
    propose is a simple workaround for the special cases of LOV display columns or columns
    where you have an image but still want to do sorting.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/apex/f?p=107:7
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • NPE error when navigating to next page based on lov selection

    hi there am having problem whn navigating to next page based on lov selection,when i select value and click the button to navigate am geting NPE ERROR
    {code}
    <DCUtil> <findSpelObject> [598] DCUtil, returning:oracle.jbo.uicli.binding.JUFormBinding, for uam_view_pageDefs_SelectOrgPageDef_WEB_INF_Updatetaskflow_definition_xml_Updatetaskflow_definition
    <DCIteratorBinding> <releaseDataInternal> [599] Releasing iterator binding:variables
    <DCIteratorBinding> <releaseDataInternal> [600] Releasing iterator binding:UpdUamOrganisationLovIterator
    <DCIteratorBinding> <releaseDataInternal> [601] Releasing iterator binding:UpdUamOrganisation1Iterator
    <DCIteratorBinding> <releaseDataInternal> [602] Releasing iterator binding:UamUserdetailsViewVo1Iterator
    <XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
    javax.servlet.ServletException: java.lang.NullPointerException
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
        at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
        at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
        at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1018)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:386)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:194)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
        ... 38 more
    Caused by: java.lang.NullPointerException
        at showSelectedOrg(OrgDetails.java:2455)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.el.parser.AstValue.invoke(Unknown Source)
        at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
        at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
        ... 45 more
    THIS IS THE LINE AM GETING THE ERROR
    method.getParamsMap().put("rowKey", newVal);
    <af:selectOneChoice value="#{bindings.Orgid1.inputValue}"
                                  required="true"
                                  id="soc1" autoSubmit="true" valuePassThru="true"
                                  contentStyle="width:145px">
                <f:selectItems value="#{bindings.Organisationid.items}" id="si1"/>
              </af:selectOneChoice>
    <af:commandButton text="UpdateOrganisation"
                                id="cb1"
                                action="#{pageFlowScope.addMember.showSelectedOrg}"/>
    public String showSelectedOrg() {
    /* if(getorgids() == null ||getorgids().equals(null)){
    JSFUtils.addFacesErrorMessage("Select Atleast One Organisation");
    JSFUtils.showFacesErrorMessage("Select Atleast One Organisation");
    BindingContext lBindingContext = BindingContext.getCurrent();
    BindingContainer bindings = lBindingContext.getCurrentBindingsEntry();
    // get the list binding for the Organisation lov
    JUCtrlListBinding list = (JUCtrlListBinding)bindings.get("Organisationid");
    // get the selected index from the list which is stored in the Orgidd1 attribute
    AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("Orgid1");
    Integer selid = (Integer)attr.getInputValue();
    // load the listdata
    Object row = list.getDisplayData();
    // get the selected row from the list
    Row lFromList = (Row)list.getValueFromList(selid);
    // from the row we get the PK the orgnasationId
    Object lAttribute = lFromList.getAttribute("Organisationid");
    Object orgname = lFromList.getAttribute("Organisationname");
    Number newVal = (Number)lAttribute;
    String neworg = (String)orgname;
    _logger.info("Information: selected Organisation = " + newVal);
    System.out.println("neworg " + newVal);
    System.out.println("testorg " + neworg);
    selectedState = neworg;
    // get the MethodAction for setCurrentRowWithKeyValue
    OperationBinding method = bindings.getOperationBinding("setCurrentRowWithKeyValue");
    // set hte needed parameter as the organisation id
    method.getParamsMap().put("rowKey", newVal);
    method.execute();
    // after execution check for errors
    List errors = method.getErrors();
    Exception ex = (Exception)errors.get(0);
    FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, ex.getMessage(), "Select Atleast One Organisationtest");
    FacesContext.getCurrentInstance().addMessage(null, msg);
    // keep on page in case of an error
    // navigate to the next page
    return "show";
    {code}
    am in jdeveloper 11.1.1.6.0

    adf009, please read the post I posted the link to in my previous replay. The old code format tag don't work in the new forum!
    Still the same error. The stack trace still points to it, you only need to read it carefulle
    javax.faces.el.EvaluationException: java.lang.NullPointerException
        at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
    Caused by: java.lang.NullPointerException
        OrgDetails.showSelectedOrg(OrgDetails.java:2456)
    The origin is
    method.execute();
    and the real reason is
    MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51);
    What does it tell you?
    Timo

  • How to display value based on LOV selection

    Hi,
    I have an editable table. On create operation one of the field is LOV, based on LOV selection the next field should be auto populated, please help me how to achive this.
    Thanks,

    Thanks for your reply........
    I did all these to get value based on LOV selection, but my problem is when i am trying to create a new record then everthing is working fine but normal search i am not getting the value of that attribute.
    below is my code
    Page:
    <af:column sortProperty="ProcessType" filterable="true"
    sortable="true"
    headerText="#{bindings.CmWeeklyProcesses.hints.ProcessType.label}"
    id="c36" width="340px;">
    <af:inputComboboxListOfValues id="processTypeId"
    popupTitle="Search and Select: #{bindings.CmWeeklyProcesses.hints.ProcessType.label}"
    value="#{row.bindings.ProcessType.inputValue}"
    model="#{row.bindings.ProcessType.listOfValuesModel}"
    required="#{bindings.CmWeeklyProcesses.hints.ProcessType.mandatory}"
    columns="#{bindings.CmWeeklyProcesses.hints.ProcessType.displayWidth}"
    shortDesc="#{bindings.CmWeeklyProcesses.hints.ProcessType.tooltip}" inlineStyle="width:800px;"
    valueChangeListener="#{backingBeanScope.backing_app_CalcSchedules.weeklyDescription}"
    autoSubmit="true" >
    <!-- <f:validator binding="#{row.bindings.ProcessType.validator}"/>-->
    </af:inputComboboxListOfValues>
    </af:column>
    <!--value="#{row.bindings.Description.inputValue}" backingBeanScope.backing_app_CalcSchedules.description-->//If i use this value in the below property line then i am not getting value while creating time but if i done blind search then i am not getting any value in this field.
    <af:column sortProperty="Description" filterable="true"
    sortable="true"
    headerText="#{bindings.CmWeeklyProcesses.hints.Description.label}"
    id="c35" width="390px;">
    <af:inputComboboxListOfValues id="descriptionId"
    popupTitle="Search and Select: #{bindings.CmWeeklyProcesses.hints.Description.label}"
    value="#{row.bindings.Description.inputValue}"
    model="#{row.bindings.Description.listOfValuesModel}"
    required="#{bindings.CmWeeklyProcesses.hints.Description.mandatory}"
    columns="#{bindings.CmWeeklyProcesses.hints.Description.displayWidth}"
    shortDesc="#{bindings.CmWeeklyProcesses.hints.Description.tooltip}" inlineStyle="width:1000px;"
    readOnly="true" partialTriggers="processTypeId">
    <f:validator binding="#{row.bindings.Description.validator}"/>
    </af:inputComboboxListOfValues>
    </af:column>

  • Populate tabular form items based on LOV in header

    Hi,
    I have an LOV (Select List with submit) defined as the item in the same region as a tabular form. I'm using the first row in the LOV as the default value.
    Following is the query for the LOV:
    SELECT team_code ||' - '|| description as d, team_id as r FROM cp_teams ORDER BY team_id
    If the user selects a value in the LOV it would then automatically refresh the tabular form based on LOV's return value. But initially I want the tabular form to be populated using the LOV's default value.
    Problem 1) When I log in for the first time and navigate to the page, the LOV displays correctly but it shows an error below it:
    report error:
    ORA-01722: invalid number
    Surprisingly, after I have submitted the list more than once, I never see this error again until I exit.
    Question 1) Does this mean that for the first time, the LOV is not being "submitted" and thus tabular form underneath it has nothing to show?
    How do I automatically submit the lov as soon as I navigate to the page?
    Problem 2) I have a field (item) TEAM_ID in the tabular form's query which should take the TEAM_ID passed from the LOV for every new record that is created.
    Question 2) How do I initialize this field for a new record from the "header" LOV? The ultimate objective is to have the TEAM_ID populated for all the records created in the tabular form.
    As you can see I'm a newbie to APEX so I'd appreciate any help.
    Thanks,
    Sunil

    Sunil,
    1. what is the null value for your header LOV. I usually use 0 or some other numerical values. You will need a computation for that LOV with a condition ITEM VALUE IS NULL in
    order to run it only once per session.
    2. In the properties of your column - Tabular Form Element - you can set the default value
    to an item value (application or page item name).
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/apex/f?p=107:7
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Cascade LOV display as text (based on LOV) in clasic report

    Hi Experts,
    It is possible to use cascade LOV - item is displayed as text (based on LOV) in clasic report ? (Display AS)
    I would like to reference to another column displayed in the report in LOV.
    Example:
    select description d,
           val_strg2 r
      from domain_cntr
    where cntr_name = 'CH_PRIM_ST_NOTE'
       and val_strg1   = #PRIM_STATUS#
       and active_idc  = 'Y'#PRIM_STATUS# is the column i would like to reference.
    Is it possible ? IN CLASIC REPORT
    regards
    J :D

    Hi,
    >
    Is it possible ? IN CLASIC REPORT
    >
    Yes.
    It may a rather long thing to code, so be ready for it.
    Here is how:
    a. Use APEX_ITEM API in your Report Query. Make sure you specify the p_item_id parameter , using #ROWNUM#
    b. In the Parent LoV wrtie an onChange event trigger that fires a JavaScript function and pass the ID of the element .
    c. In this JavaScript function make an AJAX call to get the &lt;select&gt;...&lt;option...&gt;...&lt;/select&gt; , in short the complete HTML of the child LoV
    d. Push this HTML fragment into the Child Lov. You construct the ID of the target based on the ID of parent . E.g. f01_0001 to f02_0001.
    e. You may additional keep the child invisible or disabled initially, and then make it visible/enable it after it is populated.
    Regards,

  • Where is "Display as Text (based on LOV, saves state)"

    I am developing an application using the version of HTMLDB that comes with OracleXE.
    I have a tabular form, in which the default column for a particular item is sourced from a previously entered item on another page. This is a lookup item and needs to be non-changeable by the user. So I want to use the "Display As" option "Display as Text (based on LOV, saves state)". However, this option is not available in the pull-down for "Display As". The option "Display as Text (based on LOV, does not save state)" is available, but using this option means that the item is not saved to the database.
    Does anyone know why the stateful display as option is not available.
    Thanks in advance,
    Rob

    Scott, thanks for the feedback. The problem is that although the value is displayed correctly, it is NOT saved to the database. Effectively, header information is entered in a previous screen, and one of the entered fields is written to each of the detail lines associated with the header. We are re-platforming an existing application (written in an obscure form of basic), and at this stage changing the schema is not an option. So this header item (which is a foreign key to a "store" table), is meant to be written down to each line, on the screen displayed as the store name, and written to the inserted lines as the lookup id. If I use the dispaly as text save state option teh database is updated correctly, but displays the id rather than name on the screen. The only display as lov option i can see is the one that does not save state. If I use this option the screen displays as I want but the database is not updated. I need to use the display as lov saves state option. but i do not see it.
    Any ideas?
    Thanks for your time.
    Rob

Maybe you are looking for

  • Error while calling PERFORM in SAPSCRIPT

    Hi all, I am encoutering a error while calling a perform in sapscript. Does anyone know what is the main cause? The shortdump description is: Short text                                 Missing parameter with PERFORM.    I do not know what is missing

  • My iPhone 4S wont turn on, died after charging it to 100%

    I have an iPhone 4S with recently updated iOS 7. Today I charged my phone to 100% and went out to watch football. When going to unlock it the image on the screen said my phone was dead and I needed to plug it in. It often does this but comes around a

  • Over MobileMe Issues

    I am totally over mobileme issues yet I love iWeb. Can anyone recommend a good hosting site that is compatible with iWeb? How do I upload the site etc without using mobileme?

  • URI-Access doesn't work

    I use the xml-databases first time (9.2.0.6) - it works very well (also with register schema and the sql-select) - but the access via http://localhost:8080/oradb/etc. isn't possible (with the standard-xdbconfig.xml) - Has anybody an idea, what's wron

  • How do I cancel the flow of emails from support communities?

    How do I cancel the flow of emails from support communities?