By Default All Value Into Select List,If Select % In select List

Hi ,
i have created application process to extract state name in select list based on city name.
Now i need if i don't have city name and i have select % into City Name select List then All State Name Should Come into Select List.
Right Now if i select % into select List then It show me Blank In to state Name Select List.
How can i extract All State Name if i select % Into Select List.
My Application Process
BEGIN
  OWA_UTIL.mime_header ('text/xml', FALSE);
  HTP.p ('Cache-Control: no-cache');
  HTP.p ('Pragma: no-cache');
  OWA_UTIL.http_header_close;
htp.prn('<data>');
   HTP.prn ('<select>');
   FOR c IN (select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE AND C.CODE =:SELECT5)
LOOP
  HTP.prn ('<option value="' || c.CODE || '">' || c.NAME || '</option>');
   END LOOP;
   HTP.prn ('</select>');
htp.prn('</data>');
END;My City Name Table
CREATE TABLE  "CITY_MAS"
   (     "CODE" VARCHAR2(3) NOT NULL ENABLE,
     "NAME" VARCHAR2(1000) NOT NULL ENABLE,
     "STATE_CODE" VARCHAR2(3) NOT NULL ENABLE
        )My State Name Table
CREATE TABLE  "STATE_MAS"
   (     "CODE" VARCHAR2(3) NOT NULL ENABLE,
     "NAME" VARCHAR2(50) NOT NULL ENABLE
/How can i do this.
Thanks
Edited by: 805629 on Jan 25, 2011 2:06 AM

select S.NAME,S.CODE from STATE_MAS S join CITY_MAS C on (C.STATE_CODE=S.CODE)If you join two table you must have some equal data between this tables. and define it on your sql. Else you join will be cartesian join. if you dont want use this sql then create view
create view TEST1 as (
select S.NAME,S.CODE from STATE_MAS S,CITY_MAS C where C.STATE_CODE=S.CODE
select * from test1 where  C.CODE =:SELECT5 OR :SELECT5 = '%' Edited by: Adigozalov Gurban on Jan 25, 2011 3:46 PM

Similar Messages

  • Passing 'ALL' value into Two Parameters in SAP Crystal Reports

    Hi,
    I have one report made it from sql command in that there is 2 parameters one is C_Type and other is C_Type_HV both shows the records like 01,02,03,05 both the parameters are used in command where clause and also that report contain one sub report for showing summary made it from sql command in that command both the parameters are passing through where clause of command now i want to add 'ALL' as a value in both the parameters how i can do this in sap crystal report.
    for referance I give u both the query of report
    With Regards,
    Ganesh

    Hi Ganesh,
    Please have a look at this thread on how to add 'ALL' as a value for the prompt.
    All values in parameter
    -Abhilash

  • Defaulting LOV Values

    Please guide me on how to go ahead with the requirement .
    In iProcurement there are fields project name , project type , expenditure org ,
    task name .my requirement is to now defualt other project fields based on the project name . i have extened the projet name lov to show the the porject type , project type id , expenditure org . now i am not sure which approach to take to default these values into the other 3 lovs .
    as always
    thanks
    cp

    Add 3 mappings which will set the other LOV fields based on the project name.
    --Shiv                                                                                                                                                                               

  • SSRS 2012: How to get a "Select All" that returns NULL instead of an actual list of all values from a multi-select parameter?

    I have a multi-select parameter that can have a list of thousands of entries. In general, the user will pick a few entries from the list or "Select All". If they check "Select All", I would much prefer that I get a NULL or an empty string
    instead of a list of all values. Is there any way to do that?
    In experimenting with a work-around, I tried putting an "All" label with a null value in the list, but it is ignored (does not display in the drop-down). If I use an empty string for the value, my "All" entry does get displayed, but so
    does "Select All", which is confusing. Is there a way to suppress "Select All"?
    - Mark

    I adapted the following from a workaround posted by JNeo on 4/16/2010 at 11:14 AM at
    http://connect.microsoft.com/SQLServer/feedback/details/249227/multi-value-select-all-parameter-in-reporting-services
    To get a null value instead of the full list of all values when "Select All" is chosen:
    1) Add a multi-value parameter "MyParam" that lists the values to choose.
    2) Add a DataSet "ParamCount" identical to the one used by "MyParam", except that it returns a single column named [Count] that is a COUNT(*) of the same data
    3) Add a parameter "MyParamCount", set it to hidden and internal, then set the default value to 'Get values from a query', choosing "ParamCount" for the Dataset and the one [Count] column for the Value field.
    4) Change the parameter for the main report DataSet so that instead of using [@MyParam], it uses this expression:
    =IIF(Parameters!MyParam.Count =
    Parameters!ParamCount.Value, Nothing, Join(Parameters!MyParam.Value, ","))

  • How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables

    Hi Everyone,
    Iam stuck with 1 problem please can any 1 help me if u know the solution.
    Here is my problem:
    How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
    For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
    And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • How to default a multi-select parameter to ALL values?

    I have a parameter that allows the user to select multiple values.  I want it to default to use ALL values (meaning basically just ignore this parameter in the SQL generated).  However, I cannot create a calculation on this since it accepts multiple values, and the calculation only supports the first value.  Is there a way to do what I need, without selecting all the values in the list (the LOV contains hundreds and hundreds of values so this is not a viable option).  I am not very experienced with Discoverer and don't know all the tricks/workarounds, so looking for expert advice.
    Thanks

    Hello
    You would have to code the parameter and condition so that it accepts the word ALL.
    For example, let's say you are working with ITEM_NUMBER and you have thousands of items. You want the user to either be able to key one or more items or access ALL items.
    You need to create a Boolean condition like this:
    ITEM_NUMBER IN :ITEM_PARAMETER
    OR
    UPPER(:ITEM_PARAMETER) = 'ALL'
    So if the user keys the word ALL or all or All or any variant of the word that will be determined as true by the condition and all items will be selected. If the user does not key ALL then the other half of the condition will be applied and the Item must be a valid item as contained in the list of all items. You can even create your parameter with a default of ALL
    Best wishes
    Michael

  • How to default a value in a select list

    Hi
    I have an item on the page which is displayed as a select list.
    The select list has an lov that returns 3 values as follows:
    ACAD1M
    ACAD2H
    ACAD3T
    the sql for this lov is as follows:
    select CAL_TYPE d,cal_type r
    from igs_ca_type
    where s_cal_cat='ACADEMIC'
    It needs to return the values in the order as shown above, however if the user does not select anything from the select list, I want it to default to the value in the middle of the list(ACAD2H)
    I tried using default on the item but I could not get this to work.
    Could someone explain how I can get the select list in HTMLDB to default to the value that I want regardless of which position it appears in the select list it always seems to default to the value at the top of the list.

    Hello Kay,
    A default value for a select list must be set to a legitimate returned value from the select list LOV query.
    The default value should be set in the item "Default" section. In the "Default Value" field you should enter your query – in a form of a PL/SQL Function Body – and set the "Default Value Type" field accordingly.
    The following is an example of code I'm using to set the default value of a select list to be the first displayed option (set by the user, and recorded in the dispord column):
    declare
      l_sno  number;
    begin
      select sno
      into l_sno
      from mis_mess_users
      where dispord = (select min(dispord)
                     from mis_mess_users);
      return l_sno;
    end;Using the same principle, you can use any query that will give you the result you need.
    Regards,
    Arie.

  • How do I default a multi-select to have all values selected

    Hi all,
    I have a report (standard, not interactive - for various reasons) and I have a number of 'search' fields that the use can use to fulter the results shown. One of these fields is a multi-select list which allows the users to select multiple values at the same time. This is working fine.
    My problem is in setting the default for the multi-select list to have all values selected (either when the page is first opened or when the user clicks a 'reset' button).
    The multi-select query is:
    select
         lv1.description d, lv1.lookup_code r
    from
         tpa_adm_lookup_types lt1,
         tpa_adm_lookup_values lv1
    where
         lv1.lookup_type_id = lt1.lookup_type_id
    and lt1.lookup_type = 'RELEASE_PHASES'
    and     lv1.delete_flag = 'N'
    order by 1
    how do I get it to default to everything selected?
    Many thanks,
    Martin

    Hi Andy,
    Yes it is a dynamic list so a fixed default is no good.
    I have built the field with a source (when session state is null) of:
    with data as (
    select lookup_code, row_number() over(order by lv1.description) rn,count(*) over () cnt
    from tpa_adm_lookup_values lv1,
         tpa_adm_lookup_types lt1
    where lv1.lookup_type_id = lt1.lookup_type_id
    and lt1.lookup_type = 'RELEASE_PHASES'
    and lv1.delete_flag = 'N'  )
    select ltrim(sys_connect_by_path(lookup_code,':'),':') catvalues
    from data
       where rn = cnt
       start with rn = 1
       connect by prior rn = rn-1;which works but I was hoping ApEx had a cleaner solution.
    Regards,
    Martin

  • Report -- filter with selection list -- show all values after select page

    Hello!
    I have the following problem:
    - I have a report
    - this report can be filtered with a selection-list
    - the selection list is based on dynamic LOV and has a null-value
    - I added the code of the report the following, to filter the report after choosing a value of the selection list:
    ... and (instr(type, decode(:P8_FILTER_type, '%null%',type,:P8_FILTER_type)) > 0)
    This works very well.
    But my problem is: When the user logs out and the next time, he logs in, the selection list shows " --- show all values --- " (my null-display-value) and the report is empty "no values found".
    ---> I want to show the first time, the page is selected ALL the values of the report. (this is now only possile if I press the button which belongs to the selection list)
    I hope, somebody understands my problem.
    Thank you so much,
    LISA

    Hello Lisa,
    The first time it's probably NULL.
    So what you can do in your where: (instr(type, decode(NVL(:P8_FILTER_type,'%null%'), '%null%',type,:P8_FILTER_type)) > 0)
    Off topic: I also wonder if that where clause can't be simpler? Do you rely need the instr?
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Dropdown list with custom All Values option

    Hi,
    We are running VC on 7.4 SP2. I have a dropdown list which gets its' values from a BW query. This works great except that I want to add a custom entry which selects all values.
    In BW you would do this by setting the selection variable to "" as in nothing specified/empty. This is also the default setting in VC (you made no selection so you will get all results) but once you select something this can not be deselected.
    So the idea is to add a custom entry All with value "" but apparently this gets send to BW as """" which is not a valid value. VC does not allow to use an empty value field.
    So basically I am stuck here. Any of you found a solution to this problem?
    regards,
    Matthias

    Hi Matthias,
    I see your point. I could suggest two options:
    1. In the dropdown input control, delete the value. Then press submit.
    This works fine, only we don't get the empty value in the list.
    2. To have the empty value in the list, like this:
    Add to the entries of the list:
    Then edit the mapping to the service to convert * into an empty string:
    Thanks,
    Udi

  • How to create a search all value on list

    I am trying to create a form which will enable user to select
    an item on a list to filter records, or allow him to not select
    anything and see all records.
    I created a generic form with one list on it and a submit
    button. Values are:
    Item Label Value
    Select All-- (I left this blank)
    Bicycles--Bicycles
    Motorcycles--Motorcycles
    Skateboards--Skateboards
    My results page seems to be okay. I created a recordset and a
    dynamic table. In recordset, the default varable that was created
    shows Name: colname
    Type: Text
    Default value: -1
    Runtime Value: $_POST['2']
    Problem is that when I select one of the items from the list
    on the form (ex. skateboards), my results page shows all records
    for skateboards. When I select "Select All" from the list, I don't
    receive any records. What can I do to allow user not to enter any
    value and have him receive all records?
    Thanks in advance....

    I found the answer for all of you trying to do the same
    thing:
    In your "Select All" value, put %
    then, select 'contains' instead of = in your filter. That
    should do it! Hopefully this helps someone!

  • CR 2008, all values in parameter list not showing up

    The parameter is not optional, the parameter value exists in the view on SQL server, but at report run-time, only get 5 pages of possible values to select from and user needs to go back farther to get the required report.
    I can get the report to run in full CR version by passing the value into the select expert, but users only get prompt window from the runtime version of CR.
    How can I get ALL the values of the field in the view to show up in parameter list?
    Thanks for any pointers.
    Robert

    Not sure if the help you metion is equivalnet to KB [1218588 - How to increase the number of values in a dynamic parameter list?|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333533383338%7D.do], but have a look.
    Also, make sure you are on SP3:
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • How to populate values into a Listbox on selection screen

    Hi All,
    Please any one let me know how to populate values (for ex.01,02 and 03) in a list box of selection screen..
    Thanks,
    Vijay

    Try this code ...
    REPORT  ZLISTBOX.
    TYPE-POOLS: VRM.
    TABLES SPFLI.
    TABLES SSCRFIELDS.
    DATA flag.
    DATA: NAME TYPE VRM_ID,
    LIST TYPE VRM_VALUES,
    VALUE LIKE LINE OF LIST.
    PARAMETERS PS_PARM LIKE SPFLI-CARRID AS LISTBOX VISIBLE LENGTH 5
    USER-COMMAND fcodex.
    data: i_spfli type spfli occurs 0 with header line.
    PARAMETERS PQ_PARAM LIKE SPFLI-connid AS LISTBOX VISIBLE LENGTH 15
    USER-COMMAND
    fcodey.
    *DS AS CHECKBOX USER-COMMAND FLAG.
    INITIALIZATION.
    NAME = 'PS_PARM'.
    DATA T TYPE I VALUE 0.
    SELECT DISTINCT carrid into corresponding fields of table i_spfli FROM
    SPFLI.
    loop at i_spfli.
    VALUE-KEY = i_spfli-CARRID.
    VALUE-TEXT = i_spfli-CARRID.
    APPEND VALUE TO LIST.
    endloop.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = NAME
    VALUES = LIST.
    AT SELECTION-SCREEN.
    if sy-ucomm eq 'FCODEX'.
    REFRESH LIST.
    CLEAR LIST.
    PQ_PARAM = ' '.
    NAME = 'PQ_PARAM'.
    SELECT * FROM SPFLI WHERE CARRID = PS_PARM.
    VALUE-KEY = SPFLI-connid.
    VALUE-TEXT = SPFLI-connid.
    APPEND VALUE TO LIST.
    ENDSELECT.
    endif.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SY-UCOMM NE 'FCODEX' OR SY-UCOMM NE 'FCODEY'.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = NAME
    VALUES = LIST.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    START-OF-SELECTION.
    clear i_spfli.
    refresh i_spfli.
    select * into table i_spfli from spfli where carrid = ps_parm and connid
    = pq_param.
    loop at i_spfli.
    WRITE: / 'CITY FROM:', I_SPFLI-CITYFROM, 'CITY TO :',I_SPFLI-CITYTO,
    'DEPARTURE TIME :', I_SPFLI-DEPTIME.
    ENDLOOP.

  • List Template Always Defaluts to 'Current View' Rather than the Defaulted ' All Tasks' Veiw

    I have created a task list template.  I have selected all of columns and deleted all others.  I have created only one view clled 'All Tasks' and set it to my defult, in addition I have deleted all of the other views.  However, when I instert
    the task template on another page or when it's used as part of a site template it reverts back to 'Current View' and shows a bunch of columns that I deleted.  I am forced to change the view everytime I insert it on to a page.  Under the List Settings
    I don't even see anything called 'Current View'.
    How do I avoid this default?

    Hi KHDMS,
    According to your description, I did a test in my SharePoint 2010 as the followings:
    1. Create a task list named ‘Task template’, create a custom view named ‘View1’ different from All tasks view, and set the view as the default view
    2. Add some items into the tasks list
    3. Delete other views except the view1
    4. Create a page,  add the tasks ‘Task template’ into the page
    5. Then the web part displayed like All Tasks view in the tasks list
    6.  Create another tasks list ‘Tasks2’, create a custom view named ‘View1’ diferent from All Tasks view, and set the view as the default view
    7. Reproduce the step 4, then the result is same with the above test.
    8. Then I tried to set the system view like ‘My task’ as the default view, then reproduced the step 4
    9. The web part displayed as My Task view.
    For this issue, it seems to be happened on the custom view, if you want to display the custom view for the tasks web part on a page, you can do as Edit Web Part-> selecting the custom view under Selected View.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to Save the multiple selection check box values into the database

    i have the multiple selection check box implemented in UI through drop down list,i can choose the desired values from the drop down through checkbox, but i m unable to store these values and commit the values into the database all at a time.

    You can access the values using listbinding and can then store them as a string by using a delimiter.

Maybe you are looking for

  • Error while changing standard application

    I am making some changes in standard Leave Application. It's reflecting some Error saying 1. The project was not built since its classpath is incomplete. Cannot find the class file for com.sap.aii.proxy.framework.core.AbstractProxy. Fix the classpath

  • Document with submit button, and signature with second submit button

    I have a form that is filled out by one person who submits the completed form to his/her manager. When that manager signs the form, he/she also clicks a radio button either approved or not approved. When I test this form and click not approved the fo

  • OSB DB Adapter Polling Issue

    Hello Everybody, Requirement I am doing DB Adapter polling in OSB.I have a db adapter which polls order table whenever there is a record with status='N'.The OSB component is on single node of Weblogic Server. 1.The db adapter picks the order data wit

  • I can't update the firmware on my CP1525nw

    1. Product Name and Number      • HP CP-1525nw  2. Operating System installed (if applicable)      • OSX 10.7.2, printer connected via ethernet cable to my Airport Extreme base station.  3. Error message (if any) I downloaded the Firmware Updater, un

  • Subscription administration for all admin-users possible?

    Hi all, at a customer exist the following scenario: one admin user creates subscription for folders, another admin user should be able to modify this subscription (in substitute function). How can I achieve this? Thanks, Andre