Multi valued LOV - Display vs return

APEX 4.2.1
On a form view, when there is a multi-valued LOV (checkbox, shuttle, multi-select list, etc), APEX item value in session state is a colon-delimited list and this is what gets saved to the varchar2 column in the database table. Assuming there is a simple lookup table to translate display/return values, on the report view for this data, how can this value (e.g. 1:2:3) be shown using the display values (e.g. One:Two:Three) instead?
Thanks

VANJ wrote:
Paul - I do agree and most of the time I am a stickler for proper database design. But for simple data-gathering exercises (think a typical customer satisfaction form with a bunch of questions, some of which are Choose all that apply ), creating itty-bitty tables (one per such column) for just this purpose seems like overkill.Would websheets be any use in that space? (Not something I've really looked into.)
Alternatively, one could simply setup the LOV to have the same display/return values and then the column could store One:Two:Three so the problem goes away.That was going to be my next suggestion.
But that would preclude the use of a user-editable LOV table where the user can change the display value(s) but keep the (stored) return value(s) unchanged.User-modifiable look-ups would be getting away from my definition of "simple data-gathering exercises" involving "itty-bitty tables".
Even if the data were to be stored in normal form, the report view would need to show 1 row regardless of the number of LOV choices, so the report query would have to use scalar sub-queries using string aggregation (e.g. LISTAGG function in Oracle 11gR2) of the form
select
(select stragg(m1.display_val) from detail1 d1, mapping1 m1 where d1.code=m1.code and d1.pk = m.pk) detail1,
(select stragg(m2.display_val) from detail2 d2, mapping2 m2 where d2.code=m2.code and d2.pk = m.pk) detail2,
from master mNot exactly elegant SQL, so then why be a stickler for normal form, just continue with the dirty hacks :-) Or am I missing something?And even less elegant when you add the code required to un-nest the delimited list. The last major APEX project I worked on use this [anti]pattern a lot (albeit using tables in proper normal form). I'm not keen on the resulting HTML structures either (unless they're nested lists). I was involved there too late to convince them to use some other presentation in the reports, but did manage to change the display value aggregation from using custom PL/SQL functions with cursor loops to inline SQL using <tt>xmlagg</tt>. (Since most of the time these display values were links some inelegant SQL and violation of separated concerns was involved. <tt>xmlagg</tt> has some benefits over <tt>listagg</tt> in this use case: works on 10g; semantic HTML for the aggregated values (e.g. lists) can easily be produced using SQL/XML; aggregates larger than 4000 byte VARCHAR2s can be returned using <tt>xmlserialize</tt>. The report break formatting enhancements detailed in Feature Request ABPF are badly needed to enable this kind of thing to be done declaratively.)
So....is there a way to have my cake and eat it too? Off-the-wall, unhinged, untested, and almost certainly very inefficient brainstorm: create a view consisting of a column with every possible combination of the value columns and another with the corresponding display value combination, and perform an outer join on the aggregated values...

Similar Messages

  • LOV Displays the Return Value when Read Only

    Greetings,
    I searched for a question/answer for this, but didn't find this exact scenario mentioned, but I may have missed it. If you know of this already been asked/answered just point me to the thread.
    On APEX version - 4.1.1.00.23
    I have a LOV that is populated by a dynamic action from another LOV. That works great. Depending on the value of another page item the 2nd LOV is Editable or Read Only. The problem is that when the 2nd LOV is Read Only the result value (an ID) displays instead of the display value.
    1 - Why is this?
    2 - How do I prevent this from happening?
    Also, I don't want 2 separate page items (one for edit, one for display) for the 2nd LOV, because the 2nd LOV also has a dynamic action on it to populate a 3rd LOV. The population of the 3rd LOV works great, whether the 2nd LOV is editable or read only.
    = = = = = = = 2nd LOV SQL = = = = = = =
    select sub_com_desc||' - '||commodity_desc d, defect_code_header_id r
    from qcis_defect_code_header
    where inactive_date IS NULL and plant_id = :P10_PLANT_ID
    order by sub_com_desc
    = = = = = = = = = = = = = = = = = = = =
    Thanks, Tony
    Edited by: cloaked on May 8, 2013 12:11 PM

    I've decided to try a different approach. Since the Select List LOV was Read Only and not populating correctly it was causing a session state error when inserting the row. So, I've made the Select List LOV editable, but it shouldn't be. I now need to disable the page item using JavaScript to prevent it from being changed. I need to do so only when a page item contains a certain value.
    Will someone share an example of JavaScript snippet of code I need to use? (I'm not much of a JavaScript coder.)
    The page item I need to disable is named - P10_DEFECT_HEADER_ID
    I need to disable it when P10_MAP_TYPE = 'P'
    Thanks, Tony
    Edited by: cloaked on May 15, 2013 1:00 PM

  • Multi-Select LOV with multiple return columns

    Hi,
    I'm wondering if it's possible (and how) to return more columns from the LOV page the calling page. Default only 1 column is displayed in the LOV and 1 column is returned.
    However it's easy to display an additional column in the LOV: Just copy the column tag change the binding column to display and change the prompt.
    Furthermore in my situation I don't have a FK between the calling page and LOV. It's just a LOV which returns values which can be edited after.
    Regards,
    Marcel

    Marcel,
    In the upcoming release it will be possible to supply a comma-separated list in the 'Lookup Display Attributes' field, so that multiple fields are shown in the LOV.
    When you use UIX and have an Entity Association to the Entity Object in the LOV, passing back multiple fields is already possible. But in your case, you will probably have to use your own javascript to implement this functionality.
    Kind regards,
    Peter Ebell
    JHeadstart Team

  • Popup LOV with same display and return values

    Hi
    I have created a List of Value using the following query.
    SELECT partner_name display, partner_name return
    FROM partner_table
    WHERE partner_name is not null
    order by 1
    The above query returns around 3000 rows of data. This has been linked to Item as Popup Key LOV(Displays description, returns key value). When the popup is selected the values are not displayed, only "Row(s) 1 - 10" and pagination buttons are displayed.
    Could anyone please suggest me with a solution.
    Thanks in advance.

    Change the Next button label to remove the > character. This sounds like a familiar problem.
    Scott

  • How to get data from list of values (LOV) to be displayed in a text field ?

    Hi guys,
    I am very new to Oracle APEX so please spare me if it is a silly question. How can I get the selected values from a set of list of values (LOV) displayed in a text field (or text area or so) ? Fox example, in my form I create 4 items: STATE, COUNTY, STREET, ZIPCODE and all of them are LOV (list of values). I also create 2 buttons (ADD & REMOVE). Then I create a test field (or text area name SELECTED RECORD). Now here is what I want to do with my form:
    When I set the values for all 4 fields, I will click on the ADD button then I want those values be displayed in the text field.
    For example, if the selected values are:
    STATE = Alabama
    COUNTY = Abbeville
    STREET= 1 Street
    ZIPCODE = 36310
    And the ADD button is pressed. Then in the text field I want it displays like this:
    Alabama,Abbeville,1 Street,36310
    If I choose other values and click ADD again, a new line will be added into the text fields (text area). If I click the REMOVE button, then it will clear those two line in the text field.
    Would it be possible to do it? Any help will be greatly appreciated. Thanks in advance.

    If you can live with the page being submitted and refreshed, make your ADD button do a submit with a request value of ADD and make your REMOVE button do a submit with a request value of REMOVE.
    Then create two computations (one firing with a condition of Request = ADD and the other firing with a condition of Request = REMOVE).
    In the ADD one, concatenate the values together into the text area (most likely a PL/SQL computation wiill be what you want). In the REMOVE one, set it to null with a PL/SQL computation.
    If you want it done without submitting the page, make the buttons each do a redirect to a URL but instead you will have to write two short javascript functions in the page HTML header to manipulate the field values. Each button would call each javascript function in an onclick event.

  • Retrieving empty values from multi value string in user profile custom properties

    Hi,
    I created a webpart to save and retrieve data from custom properties. I use the code below to get the stored data:
    for (int i = 0; i < profile[property].Count; i++)
    Item = profile[property][i] == null ? string.Empty : profile[property][i].ToString();
    list.Add(Regex.Split(Item, @"\,\#"));
    Nothinig special about it.
    In my development environment, it works fine. The problem is  in my UAT environment. I'm facing an issue that i hope someone has been through. When the custom property is a multi value string type, it returns a empty string. I tested with HTML and single
    value fields and it works fine.
    Independently of the field type, it saves the data all right.
    Can anyone help me?
    Thanks!!

    Thanks, Chitvan Jain.
    I did as you suggested, but nothing changed. The problem is that profile[propname] comes already blank when using multi value property, even if there is data  to be retrieved.
    One funny thing is that, somehow the code manages to count the number of values there is in the property. Only the data is missing. We can see the exact number of column, cause i check if there's the right number of data, if there isn't, i add up  a empty
    string on the grid cell, but only for viewing. The empty string is not stored in the property.

  • Display Blank Tablix when using multi value parameter in SSRS 2008 R2

    I have a main report which contains tablix1 and tablix2. Tablix1 is using DataSet1 and Tablix2 is using DataSet2. I have a multi value parameter set up with 71 items to choose from. My company owns 71 convenience stores and what I am doing is comparing sales
    for a hard coded date in DataSet1 versus a hard coded date in DataSet2, sales for the same date 1 year ago. Pretty simple, works great when both datasets return data. However, we have a store that we opened up about 4 months ago. The data is displayed
    in Tablix1, but since the store did not exist 1 year ago, there is no data for Tablix2. I have tried the "No Row Message" and Repeating Column and Row Headers, etc. When I choose all stores that existed last year, the report runs great. When I choose
    a store that existed last year and our new store (#39) that did not, the report messes up. The below image, you can see Tablix1 is good, but Tablix2 should be blank and only show the column headers. Instead it moved Store #40's Tablix1 beside it. If I
    run the report and just select store #39, Tablix1 runs as it should and Tablix2 shows The column headers and a blank row. It disappears as soon as I select multiple values.
    When you click the next page button, you will see Store 40's Tablix2 where it's Tablix1 should be and then a blank space where Tablix2 should be.

    Hi BassMan75,
    According to your description, there is a main report with subreport, since the store did not exist one year ago, there is no data for the subreport. You want to show tablix grid even through there is no data in subreport, right?
    Report data comes from datasets, if there is no corresponding value in the dataset, only column headers will be displayed in the report, we could not set the rows to blank, so we can’t achieve your goal directly. As a workaround, we can put one text box
    in the report with the message: No data for the store. In this way, if there is no data meets search condition, the message will be displayed in the report. Please refer to the following steps:
    Click and select the tablix.
    In Properties window, in No Rows section, in NoRowsMessage text box, type No data for the store.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Multi-select LOV return into single row

    I have a multi-select lov setup on a column in a table layout. I want to be able to select the lov, select multiple rows in the lov and then when I press the select button in the lov window to have those lov records select return to the same column. Currently, the lov returns the multi lov records into multiple records on my table layout.

    IN JHeadstart 10.1.3, we will add the option to return multiple selected values as a comma-separated list into the same field. With 10.1.2 this is not possible. You can implement this yourself by overriding method JhsDataAction.onLovSelect.
    Steven Davelaar,
    JHeadstart Team.

  • When LOV does not return the value

    Check that you are not calling setText(String) on the web bean to set the default value. It causes your bean to no longer draw the value from the underlying VO. One of the symptoms is that selecting a value from the LOV modal window will not return that value to the base page. (The value from the LOV will actually be set on the VO, but the UI won't reflect it.)
    Setting the default value in the model layer is prefered. You can do this by overriding the create(AttributeList nameValuePair) method of OAEntityImpl or OAViewRowImpl.
    If, for some reason, you need to set the default value from the client side, you need to call setText with the pageContext, e.g., setText(pageContext, "myDefault");

    Hello
    Upon giving your question further thought I think that you would be better off if you added an 'id' column to table T1 and referenced this 'id' column in table T2 . Something like
    Table_T1(id number, c1 varchar2(100)
    and
    Table_T2(.other_columns.. ,t1_id)
    Your LOV will now be select c1 display,id return from table_t1The column t1_id will be defined to use this LOV.
    You will need no other modifications to the form on table_t2
    Varad

  • Need to display the first 5 values of a Multi value parameter in SSRS report

    Hi All,
    I have SSRS report with multi value parameter. I need to display the parameter selection values in a text box. I've more than 50 records in the multi value parameter list. I've included the code to display "All" if I choose "select
    all" option otherwise it will show the selected values. But, I need to change the logic. I have to show only the 1st 5 records if I choose more than 5 records.
    How can I implement this?
    I have used the below code
    =iif(
    Parameters!Country.Count = Count(Fields!Country.Value,
    "Country")
    ,"All"
    ,iif(Parameters!Country.Count>5
    ,"Display the 1st 5 values"
    ,Join(Parameters!Country.Value,",")
    Regards,
    Julie

    Hi Julie,
    Per my understanding that you want to always show the first values from the param country to a textbox when you have select more then five values from the dropdown list, if you checked "select all", textbox will display "All", if
    you select <=5 amount of values. it will display the selected values, right?
    I have tested on my local environment and that you can create an hide parameter(Param2) to display just the first five values from the Country and when you select more then five values from country you will get the Join(Parameters!Param2.Value,",")
    to display.
    Details information below for your reference:
    Create an new DataSet2 which the Param2 will get the values from:
    SELECT     TOP (5) Country
    FROM        tablename
    Create an new param2 and hide this parameter, Set the "Available values" and "Default values" by select the "Get the values from a query"(DataSet2)
    You can also Specify first five value for the "Available values" and "Default values", thus you will not need to follow the step1 to create the dataset2
    Modify the expression you have provided as below:
    =iif(Parameters!Country.Count = Count(Fields!Country.Value, "DataSet1"),"All" ,iif(Parameters!Country.Count>5 ,Join(Parameters!Param2.Value,","),Join(Parameters!Country.Value,",")))
    Preview like below
    If you still have any problem, please feel free to ask.
    Thanks, 
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • Value not displaying in report whereas it returns in plsql developer

    HI

    Duplicate post.
    value not displaying in report whereas it returns in plsql developer
    value not displaying in report whereas it returns in plsql developer

  • APEX - passing values from LOV's or multi-select LOV's to another APEX form

    I am new APEX development and I need to take the values from LOV's and multi-select LOV's and pass them to another APEX form. I want to take those passed values and use them in the where clause of the base-table in the called form. Any assistance would be greately appreciated.

    Hi,
    Refer this example
    http://www.talkapex.com/2009/07/apex-how-to-pass-multiselect-list.html
    Example: http://apex.oracle.com/pls/otn/f?p=20195:2100
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • Printing Multiselect LOV display values instead of code

    I have a report with a multiselect LOV (shows text, returns code), so users can choose one or more things based on the description but when they "print" (using the navigation bar print option to open a printer friendly page), the multiselect field on this new page has the codes, not the text. How can I make the text show up here too? (Apex 3.0)

    Oh - I see what I was saying wrong - it's a summary report that is having the problem - I am not returning the details, only a series of counts of various data (there are about 20 columns). Each column is a count of people, broken down by age group and gender. So the :P89_ENVIRONMENT value shows up with its text value when only one is selected from the multiselect, but when more than one is chosen, the text is replaced by the list of values separated by colons.
    I.E. (with one environment selected)
    Environment, Total, Females 10-20, Males 10-20, Females 20-30, Males 20-30 [...]
    Woods             2               1                    0                       0                       1   
    I.E. (with 4 environments selected)
    Environment, Total, Females 10-20, Males 10-20, Females 20-30, Males 20-30 [...]
    11:13:44:67        2            1                0                  0                   1
    The report query looks like this:
    SELECT :P89_ENVIRONMENT, count(gender) Total , (select count(gender) from client where gender_type = F and age > 20 and age <30), (select count(gender) from client where gender_type = M and age > 20 and age <30), (select count(gender) from client where gender_type gender_type = F and age > 30 and age <40) [...]
    Any suggestions on how I can keep a text value in the Environment column regardless of how many are selected?

  • Displaying multi valued number parameters on a report.

    I need to display the contents of some muti valued parameters on my report.  I have received two suggestions neither of which I can get to work. 
    The first suggestion uses the Join function as follows:
    WhilePrintingRecords;
    Join({?Parameter}, Chr(10));
    This only seems to work with string arrays.  I can't seem to get it to work with number arrays.
    The second suggestion is as follows. 
    WhilePrintingRecords;
    Shared numberVar counter;
    //increments the loop so that all parameter entries can be displayed
    Shared stringVar display;
    //creates a string "running total" so that all entries can be displayed
    for counter := 1 to Count({?Parameter}) do
    display := display + ToText({?Parameter}[counter],0,"") + Chr(10);
    display;
    Even though the Parameter is a multi valued number parameter it gives the following error when converting it to Text:
    "A number, currency amount, boolean, date, time, date-time, or string is required here."

    The formula for multi-value numeric parameter works just fine.
    WhilePrintingRecords;
    Shared numberVar counter;
    //increments the loop so that all parameter entries can be displayed
    Shared stringVar display;
    //creates a string "running total" so that all entries can be displayed
    for counter := 1 to Count({?Parameter}) do
    display := display + ToText({?Parameter}[counter],0,"") + Chr(10);
    display;
    Please double check the "options" area of the multi-value numeric parameter.  The only way I can replicate the error you receive is if I choose both "Multiple Values = True" and "Range Values = True".  If this is the case then set Range values to false and see if it works while leaving Multiple Values = true.

  • Multi value select LOV in report builder 10g parameter form.

    Hi All,
    I have a requirement to show a set of records by getting user input through the report parameter form.
    employee Table.
    emp_id emp_name
    1 A
    2 B
    3 C
    4 D
    5 E
    In the report i am getting emp_id input from the user through list of values (LOV query is "select emp_id from employee where emp_id =:emp_id").
    This condition is working for me. now user want to select multiple emp_id from the LOV. so that the sql query will get the related records from the employee table.
    so the LOV query will work like the following "select emp_id from employee where emp_id in (:emp_id)".
    can enybody help me to acheive the above.
    Thanks
    Leo.
    Edited by: user13359272 on Oct 24, 2012 5:25 AM

    By all means feel free to post your question as often as you like!
    In webforms DDE runs on the middle tier; it might do what you want against your local OC4J now, but it surely won't open a thing when you run it against an application server.
    Maybe you should enlighten us with your requirement, maybe there is a better solution for your problem.
    cheers

Maybe you are looking for

  • Error while starting the Wily : A socket port was already in use

    Hello, When I strat the Wily intro scope  I am getting following error. Kindly help me resolving this issue. er3esu31:p43adm 4> nohup ./runem.nohup.sh & [1] 20549 er3esu31:p43adm 5> Running Enterprise Manager with IHOME=. Running Enterprise Manager w

  • MySql select statement

    Hi All, I have java application which suppose to connect to MySql server and print the selected data. The application has 4 combo boxes (first item is empty): Name, Customer, Supplier, Status. User could choose any of these options. So there are huge

  • Lync response group stops after a while with receiving incomming calls

    Hi Folks,  We have a strange issue with the response groups of Lync.  It seems that the response group randomly stops working, what means that the users can't receive their call trough the response groups.  Only the response group call(s) don't work,

  • Expose IDoc as Webservice

    Hi, <i>"RFC-enabled function modules, function groups that contain an RFC-enabled function module, BAPIs, and XI message interfaces can be made available as Web services without any additional programming."</i> http://help.sap.com/saphelp_nw04/helpda

  • How can i turn off FMip from a PC

    Hi! I have send my sons IPAD in for service an forgot too turn off FMip. I have tryed to logon icloud.com but I can't find how too turn this func. off?