Multi Select Field populated by a csv file

Multi Select Field populated by a csv file

I requested this during some professional services while setting up SDP v14.9 Build 14960
Figured I would post the script here.
What I wanted was a Multi-Select field that I could populate from a CSV file.
For us this was a listing of every file share a user could be granted access to.
I generated the .csv file from a PowerShell script.  I run the PowerShell script daily to pull in any new shares that are created.  I stored the CSV file in the C:\Program Files\ManageEngine\ServiceDesk\custom\ folder.   Note that the attached sample has 3 columns that match the columns you might see when importing values into fields from a CSV manually.

On my Service Catalog Template, I created a custom field that must be a single-line text field (not a multi-select field). The script does the work to make this happen. Once you have that created, copy down the API Field Name from Settings Additional Fields to be used in the script.

On your template, create a Field and Form Rule.  Name it whatever you want, choose Execute Script, and paste in the script, replacing your field name.  It is the first line in the script.

That is it.  You will now have a field in your template that has all the selectable values pulled in from the CSV file.   You should be able to customize this for just about anything you need to do a multi-select for.


                  New to ADSelfService Plus?