Removing an empty value for a imported table shown in a slicer

Hi,
I've imported a table and I've put the related code field in a slicer for a my pivot table. In the slicer I can see an empty box that I want to eliminate. I've tried to apply a filter for original data and powerpivot data from the powerpivot window. Moreover
I've tried to uncheck the showing elements without data, but unsuccessfully. I've tried to update the imported tables after each applied change but no results.
Any suggests to me, please? Thanks

Hi there,
i'm facing a similar problem which i find it hard to understand.
1x fact table with 2 columns (to keep it simple):
   + col.1 - id_Division
   + col.2 - Sales_Amout
1x dimension table with the the Company Business Organization (Departments, Business Units, etc) with 3 columns:
   + col.1 - id_Division
   + col.2 - Business_Unit
   + col.3 - Business_Area
If i just load these two tables in my PowerPivot, then go to a worksheet and create a pivot table, selecting just the dimension table col.1 to the Values and col.2 to a slicer, i get the correct situation = 10x slicers corresponding to the 10x Business Units
existing in the table, as you can see in the imagem attached.
If i create a relationship between the fact table col.1  (id_Divion) with the dimension table col.1 (id_division), and then refresh the same pivot i've just created before, i get an extra empty slicer with no values in it. IS there any reason for this
to appear?
Appreciate your kind help and inputs. IF required i can share my workbook in order to get some further help.
Regards
Felino ([email protected])

Similar Messages

  • Person or Group colum in the SharePoint list retrieves empty value for Mobile phone property

    Person or Group colum in the SharePoint list retrieves empty Mobile phone for some users although thoses users have Mobile Phone values in the User Proifles. This happens only for some users. For some users  it shows Mobile phone for
    some days and after some days it dess not show Mobile Phone though Mobile Phone entries are in the User Profiles for those users.
    Appreciate any help to fix this.
    Thanks in Advance!
    Narayana Reddy
    Narayana Reddy G

    Hi Narayana,
    According to your description, my understanding is that the person or group column retrieved an empty value for Mobile phone in SharePoint 2010.
    Please go to the hidden User Information List using
    http://<SiteCollectionUrl>/_catalogs/users/detail.aspx , check the value of Mobile phone.
    Please go to CA->Monitoring->Review job definitions, scroll to User Profile to SharePoint Full Synchronization
    and
    User Profile to SharePoint Quick Synchronization, make sure they work well.
    In addition, please take a look at :
    http://donalconlon.wordpress.com/2012/03/02/sharepoint-user-information-list-is-not-being-updated/
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Remote-enabled FM - empty value for import parameter

    Hi,
    I've created a remoted-enabled FM in ECC, to be called by an ABAP program in CRM.
    The FM has a import parameter of table (of char type). When it's called by the client with a value, but the debugging shown that the value is empty.
    Is there any special attention needed when defining table type for the import parameter?
    Any help would be much appreciated.
    p/s: Apology for te newbie question.
    Thanks.
    -julius

    Hello,
    When you declare parameters under the TABLES tab, you are actually declaring a global table with header-line in the FM. Be sure you re sending/checking the values in the table, not the header line.

  • Remove null & empty values

    I created a report with multiple fields. I would like to create a generic formula in which it evaluates all the values and if it found a null or empty value it will be replaced by a 'N/A'. I was searching in the forums and I found the following formula
    if  (isnull() or ( ='')) then
           "Display the required text"
    else
    when I tried to use it i had an error that the value must be boolean. Is there is a way where  I can change all the fields as string?? and a assign "N/A"
    or
    how can I assign a "N/A"to a boolean field??
    also  I have approx. 140 fields to evaluate, does the formula can be generic or I will need to create a formula for each variable??
    thanks

    Usually when Crystal runs across a field that is NULL, it immediately stops executing the formula, unless the field is enclosed within IsNull().  However, I'm not sure if that is the case for a parameter being passed to a function.  So, you may be able to create a function like (Formula Workshop -> Create Custom Functions -> Add; basic syntax):
    function DisplayString (inVal as string) as string
    if (isnull(inVal) or (inVal ='')) then
      DisplayString = "N/A"
    else
      DisplayString = inVal
    end if
    If Crystal does stop when passing a NULL value as a parameter, then you could code a similar function (without the isnull()), and check the Convert NULL Database Values to Default option on the File -> Report Options panel.
    You would need to create one such function for each data type that you want to show "N/A" for, and for data types other than string, convert the value to a string when it is not null.
    These functions could then be used in the Display String formula for the field on the report.
    The only other way I can think of achieving this would be to base the report(s) on an SQL Command and convert NULL values to "N/A" there.  It might be a bit easier to do in an SQL Command, but probably not a whole bunch.
    Or, educate your users that when nothing is printed, it means that it's not applicable! 
    HTH,
    Carl

  • Show value for key in table

    Hello,
    i have a table in a view that shows data that comes from a aRFC
    model from the R/3 backend.
    So far so good, the values shown are the same as in the backend.
    Now i have the problem that two colums in this table contain only
    keys (one character, represented as String).
    I want to show the right values for this keys in the table, so i created
    two simple types that contain the enumerations for these two columns.
    The problem is, that i can not change the type of these two elements
    in the Context of the view controller, because they are mapped from
    the model and can not be altered.
    Is there a "best practice" approach to the topic of getting values for
    given keys from the backend?

    Hello Armin,
    yes you can change the type of your with something like this:
    // get Mofiable type of your model attribute
    ISimpleTypeModifiable statiType =               wdThis.wdGetAPI().getContext().getModifiableTypeOf(
         "YourModelNode.YourModelNode.YourModelAttribute");
    // Set valid values for this data type
    IModifiableSimpleValueSet statiValues =statiType.getSVServices().getModifiableSimpleValueSet();
    statiValues.clear();
          for (int i = 0; i < yourValues.size(); i++) {
              //set key value pairs
              String statusText = yourValues.get(i);
             statiValues.put(i, statusText);
    Hope it helps, regards
    Sakib

  • Module pool program - populating values for columns in Table control

    Hi all,
    In my module pool program Table control i  am having 10 columns fields.
    in one of the column field i have used 'PROCESS ON VALUE-REQUEST'   to get the material no.
    in that F4 search help list is having releated information of the material like material group, company code, description etc.
    user while searching for material  they will use F4 search help and in that list they will select the material .
    From the list I need releated information of the materials like material group, company code, description etc
    to be populated in other columns while selecting the material .( User is not ready to enter all the values for the fileds)
    I appended the releated values for the material in the Table control Internal table in the Process on value-request  Module.
    (after selecting material by the user from F4 search help)
    even then I am not getting the data in the screen.
    kindly help me how to proceed  to get the data in other columns.
    Thanks in advance,
    sharma

    Hi Himanshu Verma ,
    Thanks for fast reply.
    but i tried with field names available in F4  Internal table.
    even then I am not getting.
    T_DYNPFLD_MAPPING-FLDNAME = ' MTART.
    APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
    T_DYNPFLD_MAPPING-FLDNAME = 'MBRSH'.
    APPEND T_DYNPFLD_MAPPING TO ITAB_DYNPFLD_MAPPING.
      SELECT
      MATNR
    MTART
    MBRSH
    MATKL
    BISMT
    MEINS
    BSTME
      FROM MARA
      INTO TABLE INT_F4
      up to 5000 rows
      CLEAR INT_F4.
    ****function module to get pop-up window of f4.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD        = 'MATNR'
          DYNPPROG        = W_PROGNAME
          DYNPNR          = W_SCR_NUM
          DYNPROFIELD     = 'V_TAB-MATNR'
          VALUE_ORG       = 'S'
        TABLES
          VALUE_TAB       = INT_F4
          RETURN_TAB      = RETURN_VALUES
          DYNPFLD_MAPPING = ITAB_DYNPFLD_MAPPING
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2
          OTHERS          = 3.
      IF SY-SUBRC NE 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE .
        V_TAB-matnr = RETURN_VALUES-FIELDVAL.
    endif.
    I have used the above code.  I am not getting the field values available in ITAB_DYNPFLD_MAPPING.
    kindly help me how to get the exact row for the F4 table.
    Thanks in advance.
    sharma

  • XML Form - Empty value for param servername

    Hi,
    I noticed the parameter servername are empty for RenderListItem file, but ok on Edit.
    Any hint?
    Thanks and Regards,
    John

    hi vergeseMatz,
    As per my knowledge this can be done.
    "Is it possible to keep the options in the drop down list when we click the button to filter ?"
    Just call the Bapi/Data service which is giving the searched values after the filter button event is triggered.And mentioned that Bapi/data service in the dynamic property of the Drop down list.Do not forget to assign that link with the value selceted before the filter button is clicked.
    "clear the drop down list values when we click the button to reset?"
    you have to perform the same action but while reseting just send a blank or null value for search to Bapi/data service. Then do the same mentioned above.Since there will be no input for the search bapi/data service so no values will be populated in drop down.
    I hope it will help you.
    Thanks and Regards,
    Saurabh Goel

  • Table Values in Export/Import/Tables RFC calls

    Hi
    I know that using Adaptive RFC, the best practice is to use the Tables section of the function rather than the import/export.
    However, in ECC6.0, when creating entries in the Tables section of the FM it tells me that this section is obsolete.
    Should I start to use the export/import parameters instead?
    Cheers
    Ian

    Hi Ashu
    Thanks for the reply but there is no code snippet.  It is a 'best practice' question.
    The document <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de">Effective Web Dynpro - Adaptive RFC</a> details that table values should not be passed in the exporting/importing parameters of the R/3 RFC enabled function module.  THey should always be added to the Tables section.
    However, in ECC6.0, when adding entries into the Tables section of an R/3 function module, it says that this practice is obsolete.
    Therefore, what is the current best practice for Adaptive RFC??
    Cheers
    Ian

  • Populating Empty Fields for Existing Internal Table Using For All Entries

    I have an internal table called itab_extract that populates without any issues in SELECT A and SELECT B below. Trying to avoid looping, I am using select DB table 'for all entries' in itab_extract. I want the empty fields in itab_extract to populate from the values in the database. However, about 200,000 entries are being appended to the table, and, the values that existed for the already populated fields in itab_extract are gone, and the new fields are populated.
    I've played with the syntax and cannot seem to get it to work. My next option is a time consuming loop.
    How should the for all entries syntax look to accomplish filling the empty fields in the itab?   Thank-You
    *read ekko
        select ebeln lifnr aedat bsart from ekko                                                     *SELECT A*
               into  CORRESPONDING FIELDS OF TABLE me->itab_extract
               where aedat in r_aedat.
        select ebeln lifnr aedat BSART from ekko                                                  *SELECT B*
               appending CORRESPONDING FIELDS OF TABLE me->itab_extract
               where aedat in S_DATE2 AND
                     BSART IN S_BSART.
          select ebelp werks matnr                                                                           *SELECT C*
            into CORRESPONDING FIELDS OF TABLE itab_extract
            from ekpo
            FOR ALL ENTRIES IN itab_extract
            where ebeln = itab_extract-ebeln.

    Hi Tom,
               This SQL statement will be time consuming, Do not use a loop.
    There are two options.
    1. Select EKKO and EKPO details based on standard SAP view. (You can type EKKO in se11 view to find the correct view).
        also use one range table populate r_aedat and s_date2 in the same. So you where condition will have r_newrange and   
        s_bsart. Also do not use into corresponding fields, it is not a good idea. It will increase your performance. Maintain the proper 
        sequence (Based on database structure of EKKO and EKPO)
    2. If you are keen to use for all entries, then first select ekko then after your sy-subrc check get the data from EKPO.
    Should be like this.
    select ebeln bsart aedat lifnr from ekko into table gt_ekko where aedat in r_newrange and bsart in s_bsart.
    if sy-subrc eq 0.
    sort gt_ekko by ebeln ascending.
    select ebeln ebelp werks matnr  into table gt_ekpo for all entries in gt_ekko where ebeln eq gt_ekko-ebeln.
    endif.
    Hope it helps,
    Best Regards,
    Tapodipta Khan.

  • Removing result row value for a single KF rather than all KFs in a query.

    Hi,
    Is it possible to remove the value in the result row of a query for a particular keyfigure? I want the the values in the result row for all the keyfigures except one. This particular keyfigure should have nothing in the result row. Is it possible in BEx Query Designer? Because my current setup doesnt allow me to use any other BEx tool other than query designer. Would appreciate if someone can provide me a solution for this using query designer. Helpful replies will be rewarded full points.
    Regards,
    Anurag.

    u can do that...
    enter into query designer
    open ur query
    go to columns / rows
    select ur keyfigure
    on right panel u will see properties for that particular keyfigure
    go to the Result row option
    Select CALCULATE RESULT AS
    then select SUPRESS/HIDE OPTION..
    that way u can suppress the result rows for ur keyfigure.

  • Array of Ring to string value for creating a table

    I want to convert an array of ring to string and generate a table from it.
    But using property node for converting each ring is changing all the value of the table!
    each array represents different register!hence required to change  for different array! 
    i am hereby attaching a  Vi!
    Solved!
    Go to Solution.
    Attachments:
    Untitled 1.vi ‏1944 KB

    How about this simple solution? Array of a ring control to Array of string.
    /Y
    Message Edited by Yamaeda on 04-13-2010 08:36 AM
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • How to set coumn value for an ADF Table?

    Hi,
    I am currently using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. I have an ADF table in which I have a column created using View Object as Select one choice. I want to set the value(first time as selected one) in it which is coming from my second View Object. Can anyone please provide me sample code for the same?
    Thanks,
    Vik

    Hi,
    I have no idea what you are asking for. Did you try model driven List-of-Values defined for the attribute you want to update using a select one choice ? See this document http://www.oracle.com/technetwork/developer-tools/adf/learnmore/dec2010-otn-harvest-199274.pdf and look for how to create dependent list of values. Just follow the first part of it that explains how to create model driven LOV
    Frank

  • Getting empty values for Quantity and UOM in  CCA Retraction from BW to ECC

    Hi,
    We are retracting the Project data from BW to ECC following the
    SAP Network Bolg : BPS Retraction for Cost Center Accounting by Praveen Mayalur.
    I am using the following settings:
    <u>
    <b>Function Modules:</b></u>
    UPR_COST_PLAN_EXEC
    UPR_COST_PLAN_INIT
    <u><b> Parameter Exit Functions:</b></u>
    BUSI     I_BUSI
    CASE     I_CASE
    DELTA     DEL_BOOK
    MAPP     KCD_REPID
    RFC_DEST     RFCDEST
    TEST     TST_X
    VERSR3     I_VERS
    WAIT     I_WAIT
    ZARE     I_COAR
    ZELM     I_CELM
    ZTYP     I_CTYP
    <u><b> <b>parameter group</b>.</b></u>
    Retr. R/3 Comp.          9
    Retractor Control          4
    Delta Update          1
    Sender str.          UPB_SND_COPS
    Destination          ED1CLNT300
    Test mode Is Active          0
    R/3 Version                                                                
    Wait for Update                                                                
    Controlling Area          01
    Cost Element          02
    CElem category          03
    In the UPBR_Rule we have put 0AMOCC and 0QUANTITY in the Formula.
    After successful completion of retraction, we were able to get all the values to ECC except Quantity and Unit Of Measure.
    Please let me know if any other settings are to be made.
    Thanks you in advance.
    Srini.

    Dear Lokesh,
    Sorry for the confusion.
    Please note that the retraction is for Project Systems. The Retraction is done to CO Planning table COSP.
    Thank you.
    Srini.

  • Form Returns Null Values or Empty Values For Variables After Clicking OK Button

    I'm trying to create a new user based on a template user. Right now I just want to get the variables right, I just want to be able to select a template user, fill in the information that will be different, and click Create User. 
    I'm not sure why this isn't working. I think the problem is in the code for the OK button or Enter keypress but I'm not sure what's wrong with the code I've entered. Any advice would be helpful. I'm sure it's something simple but I'm fairly new to powershell
    and syntax has been rather tricky for me. Sorry if it's a rookie mistake and thanks for any advice.
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
    Write-Host "Creating The Form For Selecting Templates"
    $TemplateForm = New-Object System.Windows.Forms.Form
    $TemplateForm.Text = "Select a Template"
    $TemplateForm.Size = New-Object System.Drawing.Size(640,700)
    $TemplateForm.StartPosition = "CenterScreen"
    Write-Host "Enabling Keystroke Response on Form"
    $TemplateForm.KeyPreview = $True
    Write-Host "Defining Keystroke Response for Enter Key"
    $TemplateForm.Add_KeyDown({if ($_.KeyCode -eq "Enter")
    {$SelectedTemplate=$TemplateListBox.SelectedItem;$newuserfirstname=$FnameTextBox.Text;$newuserlastname=$LnameTextBox.Text;$newusertitle=$TitleTextBox.Text;$newuserhiringmanager=$MgrNameTextBox.Text;$newuserphonenumber=$PhoneNumberTextBox.Text;$newuserdepartment=$DeptTextBox.Text;$TemplateForm.Close()}})
    Write-Host "Defining Keystroke Response for Esc Key"
    $TemplateForm.Add_KeyDown({if ($_.KeyCode -eq "Escape")
    {$TemplateForm.Close()}})
    Write-Host "Placing OK Button On Form"
    $OKButton = New-Object System.Windows.Forms.Button
    $OKButton.Location = New-Object System.Drawing.Size(75,550)
    $OKButton.Size = New-Object System.Drawing.Size(75,23)
    $OKButton.Text = "Create User"
    $OKButton.Add_Click({$SelectedTemplate=$TemplateListBox.SelectedItem;$newuserfirstname=$FnameTextBox.Text;$newuserlastname=$LnameTextBox.Text;$newusertitle=$TitleTextBox.Text;$newuserhiringmanager=$MgrNameTextBox.Text;$newuserphonenumber=$PhoneNumberTextBox.Text;$newuserdepartment=$DeptTextBox.Text;$TemplateForm.Close()})
    $TemplateForm.Controls.Add($OKButton)
    Write-Host "Placing Cancel Button On Form"
    $CancelButton = New-Object System.Windows.Forms.Button
    $CancelButton.Location = New-Object System.Drawing.Size(150,550)
    $CancelButton.Size = New-Object System.Drawing.Size(75,23)
    $CancelButton.Text = "Cancel"
    $CancelButton.Add_Click({$TemplateForm.Close()})
    $TemplateForm.Controls.Add($CancelButton)
    Write-Host "Placing Label On Template List Box"
    $TemplateListLabel = New-Object System.Windows.Forms.Label
    $TemplateListLabel.Location = New-Object System.Drawing.Size(10,20)
    $TemplateListLabel.Size = New-Object System.Drawing.Size(280,20)
    $TemplateListLabel.Text = "Please fill out the following new user information:"
    $TemplateForm.Controls.Add($TemplateListLabel)
    Write-Host "Creating Template List Box for Form"
    $TemplateListBox = New-Object System.Windows.Forms.ListBox
    $TemplateListBox.Location = New-Object System.Drawing.Size(10,40)
    $TemplateListBox.Size = New-Object System.Drawing.Size(260,20)
    $TemplateListBox.Height = 520
    Write-Host "Placing Label On First Name Box for Form"
    $FnameTextLabel = New-Object System.Windows.Forms.Label
    $FnameTextLabel.Location = New-Object System.Drawing.Size(300,20)
    $FnameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $FnameTextLabel.Text = "First Name:"
    $TemplateForm.Controls.Add($FnameTextLabel)
    Write-Host "Creating First Name Box for Form"
    $FnameTextBox = New-Object System.Windows.Forms.TextBox
    $FnameTextBox.Location = New-Object System.Drawing.Size(300,40)
    $FnameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($FnameTextBox)
    Write-Host "Placing Label On Last Name Box for Form"
    $LnameTextLabel = New-Object System.Windows.Forms.Label
    $LnameTextLabel.Location = New-Object System.Drawing.Size(400,20)
    $LnameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $LnameTextLabel.Text = "Last Name:"
    $TemplateForm.Controls.Add($LnameTextLabel)
    Write-Host "Creating Last Name Box for Form"
    $LnameTextBox = New-Object System.Windows.Forms.TextBox
    $LnameTextBox.Location = New-Object System.Drawing.Size(400,40)
    $LnameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($LnameTextBox)
    Write-Host "Placing Label On Department Box for Form"
    $DeptTextLabel = New-Object System.Windows.Forms.Label
    $DeptTextLabel.Location = New-Object System.Drawing.Size(500,20)
    $DeptTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $DeptTextLabel.Text = "Department:"
    $TemplateForm.Controls.Add($DeptTextLabel)
    Write-Host "Creating Department Box for Form"
    $DeptTextBox = New-Object System.Windows.Forms.TextBox
    $DeptTextBox.Location = New-Object System.Drawing.Size(500,40)
    $DeptTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($DeptTextBox)
    Write-Host "Placing Label On Title Box for Form"
    $TitleTextLabel = New-Object System.Windows.Forms.Label
    $TitleTextLabel.Location = New-Object System.Drawing.Size(300,70)
    $TitleTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $TitleTextLabel.Text = "Title:"
    $TemplateForm.Controls.Add($TitleTextLabel)
    Write-Host "Creating Title Box for Form"
    $TitleTextBox = New-Object System.Windows.Forms.TextBox
    $TitleTextBox.Location = New-Object System.Drawing.Size(300,90)
    $TitleTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($TitleTextBox)
    Write-Host "Placing Label On Manager Name Box for Form"
    $MgrNameTextLabel = New-Object System.Windows.Forms.Label
    $MgrNameTextLabel.Location = New-Object System.Drawing.Size(400,70)
    $MgrNameTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $MgrNameTextLabel.Text = "Manager's Name:"
    $TemplateForm.Controls.Add($MgrNameTextLabel)
    Write-Host "Creating Manager's Name Box for Form"
    $MgrNameTextBox = New-Object System.Windows.Forms.TextBox
    $MgrNameTextBox.Location = New-Object System.Drawing.Size(400,90)
    $MgrNameTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($MgrNameTextBox)
    Write-Host "Placing Label On Manager Name Box for Form"
    $PhoneNumberTextLabel = New-Object System.Windows.Forms.Label
    $PhoneNumberTextLabel.Location = New-Object System.Drawing.Size(500,70)
    $PhoneNumberTextLabel.Size = New-Object System.Drawing.Size(95,20)
    $PhoneNumberTextLabel.Text = "Phone Number:"
    $TemplateForm.Controls.Add($PhoneNumberTextLabel)
    Write-Host "Creating Phone Number Box for Form"
    $PhoneNumberTextBox = New-Object System.Windows.Forms.TextBox
    $PhoneNumberTextBox.Location = New-Object System.Drawing.Size(500,90)
    $PhoneNumberTextBox.Size = New-Object System.Drawing.Size(95,20)
    $TemplateForm.Controls.Add($PhoneNumberTextBox)
    Write-Host "Creating Fake List of Templates"
    $TemplateGroupList = "Test"
    $TemplateForm.Controls.Add($TemplateListBox)
    Write-Host "Ensuring List Box appears in front of other windows"
    $TemplateForm.Topmost = $True
    $TemplateForm.Add_Shown({$TemplateForm.Activate()})
    [void] $TemplateForm.ShowDialog()
    $SelectedTemplate
    $newuserfirstname
    $newuserlastname
    $newusertitle
    $newuserhiringmanager
    $newuserphonenumber
    $newuserdepartment
    Pause

    If you plan on performing all of the work under the Click event, then you won't need to worry about assigning a Script scope to the variables, but if you are planning on using those variables outside of the Event, then David's answer is the way to go.
    Another option is to use a hash table as it also works around the issue with variable scope in a UI Event.
    #Define at beginning of script
    $hashtable = @{}
    $OKButton.Add_Click({$hashtable.SelectedTemplate=$Something})
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • Set default values for WSDL import?

    When importing a WSDL, the default service package it sets is "services.servicename" and the Data type package is "valueObjects".  Is it possible to configure these somewhere ,so that I do not have to retype what I want each time?  We'd like the Service package to be more like  com.mycompany.projectname.services.servicename" and the VO to be com.mycompany.projectname.valueObjects.servicename.

    Thanks  Malathi V,
    But is there any BAdI I can use for this purpose?
    Thanks
    P.S.:My customer does not want me to use user-exits.

Maybe you are looking for