How to add a default value in a prompt list?

I have a prompt list that I'm getting from the database, I want to add a deafult value in the top of the list. Ei "ALL", my current list is:
"AMERICAS"
"EMEA"
"ASIA"
I want a list like:
"ALL"
"AMERICAS"
"EMEA"
"ASIA"
This is the code I have:
@Select(Country Region\Regionname)IN @Prompt('Enter the region','A',{'All'}distinct 'Country Region\Regionname',Multi,Constrained)
It is displaying only "All". Does someone know how to merge text with a database list in a promp variable?
Thank you!
Marcela

please find this post
i've solved this problem with someone before
Optional User prompt
ok, lets get back to our problem
since you are in sybase databases i dont know weather there is a DUAL table like oracle or not,
anyway forget about it and follow those steps
1. import the universe to the desginer
2. Right Click any empty space on the Stage to Create a derived table.
3. Give The derived table any Dummy Name lets say "ALL_table"
4. write a small SQL statment in the derived table "Enter SQL Expression"
select 'ALL' from anytable you have in the database.
lets say the countries table itself
SELECT 'ALL' FROM USER.COUNTRIES
validate the SQL and Click ok.
5.you will have a derived table called "ALL_table" with field name "ALL"
6.Drag the Field Name ALL to the Same Class whicn you "Country Name" in.
7.Get back to your "Country Name" Dimension and Double Click it to get its properties, then go to the Properties tab.
8.in the peroperties tab. "Associate List of Values" ,, Click "Edit" Button.
9.you will find your "Country Name" Dimension, click "Combine Queies" icon in the bar, to have another queries union with the first one.
10. you will have another query with "U" beside itm Drag the "ALL" dimension in it, and remove the "Country Name"
so you will have 2 union queries one with the "Country Name" and another on with "ALL"
gooooooood.
11.Click "Save and Close"
12.Check Export with universe and "Automatically Refresh before use"
13.now you can hide the "ALL" dimension we have created before, to make it invisible for the users. (do you have problem hiding this dimension?)
14.export your universe
15.open WebI
16.Create Report on this universe.
17.put the "Country Name" Dimension on the filter and make it prompt,
18.Run the query,
19. tell me what you see?
good luck
Amr

Similar Messages

  • How to add a default value in a site column for every item in a document library

    HI
    i created a content type with some site columns ,
    and included in a Document library.
    Process ( content type)
    -ProcessNo
    -ProcessName
    after that i uploaded 100 Documents but not  added value in a site column process name.
    now  how i add a default value in a site column for every document in a document library 
    adil

    HI
    i get below error when i change the script 
    PS C:\scripts> C:\Scripts\updatedefaultvalue.ps1
    Cannot index into a null array.
    At C:\Scripts\updatedefaultvalue.ps1:8 char:7
    + IF($i[ <<<< "Title"] -eq $null)
        + CategoryInfo          : InvalidOperation: (Title:String) [], RuntimeExce
       ption
        + FullyQualifiedErrorId : NullArray
    $web = Get-SPWeb http://tspmcwfe:89/
    $list = $web.Lists["test"]
    $item = $list.Items | Where { $_["Name"] -eq "Emc" }
    foreach($i in $items)
    IF($i["Title"] -eq $null)
             $i["Title"] = "test"
           $i.Update()
    adil
    Why are you piping a where in the items? Do you only want to add the "test" to ones matching
    a name?
    If you have ISE installed on your server I recommend you put your code in there and debug it. 
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

  • How to set the default value in dashboard prompt?

    Hi there,
    In my Dashboard prompt I'm getting values like:
    Mar 2010
    Apr 2010
    May 2010
    Jun 2010
    How to set the default value to the current month (Jun 2010). I don't want to use "specific value". I want to use the "SQL Result" for populating the default value.
    Appreciate your help

    hi,
    you can create a Repository variable current_month with the expression as
    select to_char(trunc(sysdate),'Mon')from dual
    and use this in the prompt "Default to" Server variable and use this repository variable.
    hope this helps.
    cheers,
    vineeth

  • How to add one default value in table type value set?

    Hi All
    I have the below requirement:
    Need to display all the organization ids in the parameter for one concurrent program along with one default value of 'ALL'.
    I have created a table value set which picks up the organization name from hr_all_organization_units. But while submitting the program I should also be able to give 'ALL'.
    Any pointer/idea how to achieve this will be highly appreciated!!
    Thanks in Advance!!
    Regards,
    Shashank Mishra

    HI
    i get below error when i change the script 
    PS C:\scripts> C:\Scripts\updatedefaultvalue.ps1
    Cannot index into a null array.
    At C:\Scripts\updatedefaultvalue.ps1:8 char:7
    + IF($i[ <<<< "Title"] -eq $null)
        + CategoryInfo          : InvalidOperation: (Title:String) [], RuntimeExce
       ption
        + FullyQualifiedErrorId : NullArray
    $web = Get-SPWeb http://tspmcwfe:89/
    $list = $web.Lists["test"]
    $item = $list.Items | Where { $_["Name"] -eq "Emc" }
    foreach($i in $items)
    IF($i["Title"] -eq $null)
             $i["Title"] = "test"
           $i.Update()
    adil
    Why are you piping a where in the items? Do you only want to add the "test" to ones matching
    a name?
    If you have ISE installed on your server I recommend you put your code in there and debug it. 
    If this is helpful please mark it so. Also if this solved your problem mark as answer.

  • How to setup a default value when defining (prompting) for a value?

    When I prompt the user in a SQL statement then I can declare a default value like in:
    SELECT *
    FROM all_users
    WHERE username = nvl('&myvariable','SYSTEM');
    But when I define a variable this does not work:
    define tablename=nvl('&tablename','test123')
    How can I setup a default value here?
    Peter

    Is there a way to define a default value DIRECTLY in SQLplus DEFINE command (and not later when the value is used in SQL statement)?no, there is not for DEFINE but you can use ACCEPT:
    SQL> accept tablename prompt 'Enter value for table Name:' default EMP
    Enter value for table Name:
    SQL> select column_name
      2  from cols
      3  where table_name='&tablename';
    OrderNumber=1234
    COLUMN_NAME
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    8 rows selected.Max
    [My Italian Oracle blog| http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/]

  • How to append the Default value in the QueueValue

    Hi Frnds
    Could any one help  on how to add an default value to  an Queueid in SXMB_MONI
    My field is ID_PART, its value is    ZGRD929
    i want this as 00ZGRD929 in the interface in SXMB_MONI

    if you are looking for dynamic queue creation, refer;
    Setting Queue Dynamically using Adapter Module
    Dynamic EOIO Queue Derivation with Adapter Modules

  • How to set a default value to t-list when creating t-list programmatically

    hi,
    I'm creating a t-list programmatically
    by calling
    n = populate_group('groupname');
    populate_list('form.list','groupname');
    In this case how to set a default value for the t-list
    thanks
    rani

    I am not sure how it works in Web Dynpro for ABAP, but in Web Dynpro for Java to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element)  in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<defalut value>)
    This generally done in Initialization method of the controller.

  • SQLLDR - how to set a default value for an empty string

    I'm using SQLLDR to load data from a flat file on Oracle 10g 10.2.0.4 EE, Linux RHEL 4 update 6. Seems like my question is simple, but darned if I can't find the solution.
    My source file (comma delimited extracted form a different RDBMS) has some (not all) rows where the output for a string is "", and not NULL. How do I check for empty string and add a default value in the control file? The target column is non-nullable
    Here's my current control file - however, the column attributeName where sometimes the source record is "" does not get evaluated as NULL.
    load data
    infile 'mydata.del'
    badfile 'mydata.bad'
    discardfile 'mydata.dsc'
    into table mydata
    fields terminated by "," optionally enclosed by '"'
       TRAILING NULLCOLS           
    (l_metadata,
    company,
    className,
    attributeName "decode(:vc_attributeName,null, 'none')",
    attributeDefault)
    {code}
    When I tried decode with "", I received the following error:
    {code}SQL*Loader-350: Syntax error at line 11.
    Expecting "," or ")", found ", 'none')".
    attributeName "decode(:vc_attributeName,"", 'none')", {code}
    This does not work either:
    {code}
    load data
    infile 'mydata.del'
    badfile 'mydata.bad'
    discardfile 'mydata.dsc'
    into table mydata
    fields terminated by "," optionally enclosed by '"'
       TRAILING NULLCOLS           
    (l_metadata,
    company,
    className,
    attributeName NULLIF attributeName = BLANKS ,"decode(:vc_attributeName,null, 'none')",
    attributeDefault) I get the following in the log:
    Table COMPANYMETADATA, loaded from every logical record.
    Insert option in effect for this table: INSERT
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    L_METADATA                          FIRST     *   ,  O(") CHARACTER
    COMPANY                            NEXT     *   ,  O(") CHARACTER
    CLASSNAME                         NEXT     *   ,  O(") CHARACTER
    ATTRIBUTENAME                     NEXT     *   ,  O(") CHARACTER
        NULL if ATTRIBUTENAME = BLANKS
        SQL string for column : "decode(:attributeName,null, 'none')"
    ATTRIBUTEDEFAULT                  NEXT     *   ,  O(") CHARACTER
    Record 1: Rejected - Error on table COMPANYMETADATA, column ATTRIBUTENAME.
    ORA-01400: cannot insert NULL into ("SRV5"."COMPANYMETADATA"."ATTRIBUTENAME")
    {code}
    Any help is appreciated -
    Edited by: kpw on Feb 9, 2009 11:10 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hello,
    I just loaded following data successfully in my_data table using the same control file I posted. Yes it will evaluate "" as null and replace with none, remember in control file you have this option, "optionally enclosed by '"'.
    #my_data.dat
    "myname1", "attribname1"
    "myname2", "attribname2"
    "myname3", "attribname3"
    "myname4", ""
    #my_data.ctl
    load data
    into table my_data
    fields terminated by "," optionally enclosed by '"'
    TRAILING NULLCOLS           
    my_name char(30),
    vc_attributeName "decode(:vc_attributeName,null, 'none', :vc_attributeName)"
    {code}
    Here is the output log file
    {code}
    Control File:   my_data.ctl
    Data File:      mydata.dat
      Bad File:     mydata.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table MY_DATA, loaded from every logical record.
    Insert option in effect for this table: INSERT
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    MY_NAME                             FIRST    30   ,  O(") CHARACTER           
    VC_ATTRIBUTENAME                     NEXT     *   ,  O(") CHARACTER           
        SQL string for column : "decode(:vc_attributeName,null, 'none', :vc_attributeName)"
    Table MY_DATA:
      4 Rows successfully loaded.
      0 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  18560 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             4
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Mon Feb 09 18:17:35 2009
    Run ended on Mon Feb 09 18:17:36 2009
    Elapsed time was:     00:00:00.98
    CPU time was:         00:00:00.10
    {code}
    Hope this helps clearing your dobuts
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to set the default values for fields

    Hi all,
    How to show the default values without changing the existing code in the CO for the seeded page.
    I have requirement like one drown box in that three values are there. On page load the item is empty , but i have to show first value as default value. Is this possible through personalization..
    Can any body have idea pls give some suggession.
    Thanks
    Uma

    Considering you don't want to go for controller extension..
    A way is to use java script in personalization.
    Simply create a RawTextBean using personalization and add the java code to change the properties.
    Java script plan:
    Get the handle of the items to change (like here drop down)
    selectTags=document.getElementsByTagName('select') --gives list of all the select tags in the page
    get ID of the select tag whose value you want to change (loop throug selectTags array).
    or get it directly by getElementsByName method or getElementsByID mETHOD.
    Say its handle is changeItemID.
    changeItemID.selectedIndex=2
    Overview of script
    <SCRIPT type="text/javascript">function _checkLoad(eventXX){
    --yOUR CODE FOR GETTING handle Of the select item whose value is to be changed,goes here...
    changeItemID.selectedIndex=2
    }</SCRIPT>

  • How to Change a Default Value from Drop Down Box displayed in Web Dynpro?

    Hi,
    How to Change a Default Value from 'High' to 'Low'  in a Drop Down Box for RANGE field displayed in Standard Web Dynpro Component.  I saw a Default Value set for a RANGE field  in View Context When I select that field and click on Display. I am seeing Default Value set it to 'HI'. Please let me know how to change from HIgh to Low.
    I appreciate your help!
    Thanks,
    Monica

    hi,
    use the set_attribute( ) method now to set the attribute with a particular key eg HIGH in ur case
    // u can use the code wizard( control +f7) this code will be auto generated when u select the
    //radio button to read the context node
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
      DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
      DATA ls_cn_node TYPE wd_this->element_cn_node.
    * navigate from <CONTEXT> to <CN_NODE> via lead selection
      lo_nd_cn_node = wd_context->get_child_node( name = wd_this->wdctx_cn_node ).
    * get element via lead selection
      lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    * set single attribute
      lo_el_cn_node->set_attribute(
          name =  `ATTribute name.`
          value = 'LOW' ).
    it will solve ur query ..
    also refer to this component
    wdr_test_events -> view dropdownbyidx and dropdownbykey ->method name onactionselect.
    regards,
    amit

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • How to set a default value for a page item

    I am working with a facility table that has name and address information. The user can add contact name information on a separate page. Since the address for the facility and contact is usually the same, I want to add a default value for the contact address. The facility page is on 201 and the link to add a new contact row is on page 202. I showed in the default value :P201_street for the contact's address. But, when I run the page, the contact address field shows the :P201_street, not the actual facility address. What am I leaving out? Must be something obvious?!
    Thanks very much.
    Judy

    In the default value, I showed: v('P201_STREET1') with the default value type of: PL/SQL Expression and received the following oracle error ==> Item default is not a PL/SQL expression. Use &ITEM syntax. The v('ITEM') syntax is not valid for item defaults. So I changed it to: &P201_STREET1 and got another oracle error , ERR-9132 error in PLSQL expression for item default code, item=P202_STREET1.
    Any more suggestions? Thx.
    Judy

  • In Drop Down by Index how can i pass default value Dynamically

    Hi Friends,
    In Drop Down by Index how can i pass default value Dynamically.Please help me.
    Thanks in advance.
    Regards,
    Kumar.

    hi,
    if you want the value to be defaulted only the first time you execute the program then write the code which suman has mentioned in the views method
    wddoinit.
    Regards
    Sajid

  • How to set a default value in my DropDown using the key  ?

    Hello All,
      Can someone advose how I can achieve the above ? I will like to know how to select a default value for the dropdown by key using the key value instead of description.
      The reason why I need to do so instead o fusing description is because my application will populate the dropdown using web services based on the language selection. Hence, if I were to set the default value using description, den other languages will not work anymore.
      Any help will be greatly appreciated. Thank you !!
    from
    KWok Wei

    Kwok,
    Assuming that:
    1. You have a node NodeX, where attribute TargetAttr defined
    2. You have a DropDownByKey UI control, its property selectedKey bound to NodeX.TargetAttr attribute
    Then:
    Place in your code:
    wdContext.currentNodeXElement().setTargetAttr("yourKey");
    VS
    P.S. This topic was raised several times, and forum search works good enough to find an answer

  • How to set a default value in dropdown list in Wendynpro ABAP? Help!

    Hi Experts,
           I have Webdynpro for ABAP application that shows a DropdownwithKey UI element.
    1. I am able to populate the dropdown list. But by default the list is not showing any value. Only when I select a value from the list then it shows it.
    So how to set the default value to the first value in the list? Any code sample will be really helpfull.
    I have written the following code:
    method WDDOINIT .
      DATA:
        node_category TYPE REF TO if_wd_context_node_info.
      node_category = WD_CONTEXT->GET_NODE_INFO( ).
      node_category = node_category->GET_CHILD_NODE( 'CATEGORY' ).
      data:    LT_VALUESET type WDR_CONTEXT_ATTR_VALUE_LIST,
               L_VALUE type WDR_CONTEXT_ATTR_VALUE.
    L_VALUE-VALUE      = 'V1'.
    L_VALUE-TEXT    = 'yesterday'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V2'.
    L_VALUE-TEXT    = 'today'.
    INSERT L_VALUE into table LT_VALUESET.
    L_VALUE-VALUE      = 'V3'.
    L_VALUE-TEXT    = 'tomorrow'.
    INSERT L_VALUE into table LT_VALUESET.
    node_category->SET_ATTRIBUTE_VALUE_SET(
                 NAME = 'CAT_VALUE'
                 VALUE_SET = LT_VALUESET ).
    endmethod.
    Note that: I am using webdynpro for ABAP.
    Thanks
    Gopal

    I am not sure how it works in Web Dynpro for ABAP, but in Web Dynpro for Java to set default drop down value you will have to set the value for particular attribute (which is linked to the dropdown element)  in the context
    like
    wdContext.currentContext<nodeName>Element.set<FieldName>(<defalut value>)
    This generally done in Initialization method of the controller.

Maybe you are looking for

  • How to use this CF - BAPI_SALESORDER_CHANGE to set reason for rejec in VA02

    Hi gurus, Can anybody guide me how can i use this Call function in the program to change sales order item data. Requirement: I want to set an Reason for Rejection in Open sales orders . how should i use this call function in program so that i can set

  • Itunes doesn't recognize my iphone, thinks it's a camera

    I open itunes and I don't find my phone listed in the left margin. I am a total newbie here, so bear with me. My phone syncs fine, but I can't get my new music from the itunes library to my phone. V

  • Report Painter - Forms

    Hi Gurus, I needed to develop report painter report for WBS element, where I need to compare two plan versions against  the actual. The report out put is done. User need to enter two plan version as input in the selection,  for both the plan versions

  • Cant preview in Designer ES2

    Hi All, Went through a mandatory OS upgrade to Windows 7 along with several other updates. Since then, I can get into LC ES2 and open my forms but when I try to preview I get an error then LC shuts down. Anyone have any experieince fixing this proble

  • Field selection for Notification type

    Hi all, I have a configured  a notification type. I want to hide unwanted fields . I checked for " Set Field Selection for Notifications" in spro but  i am not able to find these fields. The Fields are under below tabs location Data Tab 1.Room-ILOA-M