# User Dataset

**URL:** <https://forum.inductiveautomation.com/t/user-dataset/11846>\
**Category:** Ignition\
**Created:** [June 22, 2016, 5:12pm UTC](https://forum.inductiveautomation.com/t/user-dataset/11846 "2016-06-22T17:12:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qversa](https://avatars.discourse-cdn.com/v4/letter/q/35a633/32.png) [@qversa](https://forum.inductiveautomation.com/u/qversa)\
**Post date:** [June 22, 2016, 5:12pm UTC](https://forum.inductiveautomation.com/t/user-dataset/11846/1 "2016-06-22T17:12:16Z")

</div>

I’m looking for some coding help with Datasets. I would like to create a Window with a list of all users where the operator can select his name and a password box will popup. This way they do not have to type in their username but only their password (cumbersome touchscreen). I think I need to create a Dataset using the system.user.getUsers("") function? I think the Dataset needs to be a Custom Property of the Window? From there I can reference the Dataset to fill my Window with buttons that have the Username on them. When they click the button the Username is passed to a popup Window where they simply have to enter their password. I hope this makes sense? I’m just stuck on how to get the User data into the Dataset.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [June 22, 2016, 5:44pm UTC](https://forum.inductiveautomation.com/t/user-dataset/11846/2 "2016-06-22T17:44:25Z")

</div>

I use something like this to put users into a list component.

[code]users=system.user.getUsers(’’)  
headers = [“username”]  
userList=[]  
for user in users:  
userList.append([user.get(user.Username)])

usersOut = system.dataset.toDataSet(headers,userList)  
event.source.parent.getComponent(‘List’).data = usersOut[/code]

---

<div class="post-metadata">

**Author:** ![ematschke](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ematschke/32/7544_2.png) [@ematschke](https://forum.inductiveautomation.com/u/ematschke)\
**Post date:** [October 10, 2019, 10:38pm UTC](https://forum.inductiveautomation.com/t/user-dataset/11846/3 "2019-10-10T22:38:44Z")

</div>

Thanks Jordan,  
I used that to put the users directly into a DropDown component

users=system.user.getUsers("") #Get users from the default User Source.  
headers = [“Username”] #create a list that has headers, only one header  
userList=[] #Create another list that will be the user names  
for user in users: #iterate through the list of users  
userList.append([user.get(user.Username)]) # add each row to the list (you need to tab this line for proper syntax as part of the for loop.

usersOut = system.dataset.toDataSet(headers,userList) # create a dataset object  
event.source.parent.getComponent(‘DD\_User’).data = usersOut #put the dataset into this DropDown Component
