giving something back after taking a lot :-)

Maik Koster at myITforum.com

MDT Web FrontEnd - How To create custom Lists to select from pre-defined values for a setting

March 02, 2010

In the Last Post I showed you, how you can easily create a custom Setting in the MDT Database and use it in your custom scripts. In the example shown we added a custom Setting called “CollectionID” to the Database to enable some kind of Pre-staging for computers. With the example you would e.g. be able to pre-stage computer based on their SerialNumber in the MDT Database and then add it on the fly to the appropriate collection on the fly when pxe/cd booting the new computer. Very helpful if your hardware vendor can’t supply you with a valid MAC Address in advance.

But wouldn’t it be nice to not require the User to enter a specific CollectionID? Wouldn’t it be nice to give him a pre-defined list of values he can select from? Let’s see how we can solve this with the MDT Web FrontEnd. A new feature that came with Version 1 is the option to create custom Lists and assign those lists to individual settings.

A List consists of one or several List Entries. Each defined by a Text shown to the User and a Value stored in the Database. Also a list can either allow only a single value to be selected or multiple values.

 

Let’s start with the single select as this is what we would need for our example (selecting multiple collections doesn’t make much sense in this scenario). OK, we need a new List. Open the MDT Web FrontEnd, click on the Settings and then on the Lists tab. You will see an overview about all the lists configured so far. The FrontEnd comes already with some pre-defined lists. Now click on the Add List button.

Lists_Add_Step1 

First our new List needs a meaningful name. Let’s call it Collections and give it a short description to help others identifying the lists content. Don’t check the Select Multiple. We will see another example for this later in this HowTo. After supplying a new name, click the Save button.

Lists_Add_Step2

Now we nee to add some Entries to the list. Each Entry consists of the text shown to the User and the value stored in the Database. See the following screen for an example.

Lists_Edit_AddEntry_Step2

You can edit these lists at any later time. Removing old entries, adding new ones and also re-order them.

OK, next step. We now need to assign this list to our Setting. In the last post we used a category called Helpdesk Settings for this. Let’s update this category. Click on the Settings tab and then on the Categories tab. Now click the edit Icon of our Helpdesk Settings category.

image

As we can’t edit an existing setting, we need to remove the setting first and then we re-add it using the new List (Yes, it’s on my ToDo list for the next release)

image

After saving all our changes are effective immediately. Let’s see how this looks like to our Helpdesk Users. For demonstration purposes I added the CollectionID setting again to a different Category so that you can see that the value stored in the Database is still the collection id itself. (It’s configured as ReadOnly so won’t disturb anything)

 

image

 

OK, but what about Multiple values?

A good example for this is the setting KeyboardLocale. This setting defines the default keyboard layout installed on Windows XP Systems. And it can take more than one value. Let’s create a custom list to let our Helpdesk users pick the appropriate values. We open the lists and add a new list as described earlier. But this time check the "Select Multiple” checkbox. Now add a couple of valid entries to the list. The example below is showing the necessary settings for German (Germany), English (US), English (UK), French (France) and Norwegian (Norway - Nynorsk) taken from Locale IDs, Input Locales, and Language Collections for Windows XP and Windows Server 2003. Finding the appropriate values is actually often the hardest part so your co-workers will be very happy to not spent their time on this if you figured it out already ;-)

image

 

Now you can use this List again to assign it to a setting as described already. Let’s have a look on how it would look like for our Helpdesk Users when editing the settings of a computer

image

the Demo Category contains again a readonly copy of this setting to see how it is stored in the database. All entries from the list can be chosen by the dropdown list. All values are shown but only the ones still available can be clicked. The chosen values can be re-ordered by Drag&Drop and the order will also be reflected by the order stored in the database.

As you can see another useful feature for the Web FrontEnd making the daily handling for you and your co-workers a lot easier. For more information about other topics have a look on the Documentation on Codeplex. If you aren’t using the FrontEnd yet, just download it from Codeplex now and follow the Installation Guide. It will take you less than 10 minutes and you will already be able to configure your first values no matter if you are using the MDT Database already or just going to create it now.

 

This How To is part of a series showing different features of the Web FrontEnd. If you got something useful out of this one, please also have a look on the others published so far:

- How To restrict access to the Deployment Database

- How To configure what a User can see and edit

- How To handle Custom Settings

- How To create custom Lists to select pre-defined values for a setting

- How To handle MDT Applications in the FrontEnd

- How To handle SCCM packages

Comments

  • No Comments