Show users in valuelist

I guess this would be possible, but I don’t know how to do it…
I like to have a combobox with the users that are created in the ‘Security’ menu. And I like to return the userID in the dataprovider and show the name in the form.

That’s easy:

var allUsers = security.getUsers();
resultID = allUsers.getColumnAsArray(1);
resultValue = allUsers.getColumnAsArray(2);
application.setValueListItems( 'valuelistename',  resultValue, resultID)

Patrick

Thank you Patrick! The names do show in the combobox, but when I select the name, the field stays empty… any idea what goes wrong here?

Note: the valuelist is used in a portal.

Is the value list set to non-editable?

You’re right again, Patrick! The valuelist was editable… :oops:
This is going to be great! :D