I have this to get you started. This will look up all the departments and store them in the Variable allDepartments. You would need to add this somewhere into the script, this will get all the sites, format them into a variable called setValues. Then you would need to use setValues for the list of Departments, then do the same for Buildings.
I will say I use this script for setting the Site of a device but I found calling it in the big DEPNotify script was a hassle so I opted to use siftDialog and call this as part of a policy. Let me know how it goes I'd be interested if I could use this in my DEPNotify script.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.