Select a username via dropdown

Hi all

is there a possibility to select the username via dropdown instead of typing it in with the touchkeyboard everytime in the login widget?

I would like to have a selection of the possible Users with a dropdown menu and the selected one should be used for login

Thanks

1 Like

Hi Stephan,

It depends what widget you want to use for login, if you use “Login” widget there is no way to bind username string to it, you can only predefined a username.

But you can check about the “LoginButton” you can bind as string the userName and the password, so you can handle as you want the user input. See the help here:

Hope that answers you question!

Regards,
Florent

But how do I get the possible Users from the User/Role System?

I could make an Textfile with all the usernames in it and connect these Textes to a dropdown which is binded to the Login Widget.

But then if a user changes, I have to make the change also in the textfile…

Hi Stehan,

If you are using ArUser you can list user using “ArUserInitList”, “ArUserDestroyList”, “ArUserGetFirst” and “ArUserGetNext” function block. You can easily make your own function block that return the list of current users.

If you are using MpUserX you can use the “MpUserXManagerUI” function block and in the “UIConnect” variable you will found the list of the users (20 users per page) and you can check next pages. Same as for ArUser you can make your own function block that return a list of current users.

When you have the list of current user, you need to create the “dataProvider” in an array or in a string variable, then you bind it to the dropdown box you want to use.

A little hint for the “dataProvider”, set the “value” and “text” with the username, like this you can just bind the “selectedValue” property of the dropdownbox directly to the “LoginButton” !

Regards,
Florent

1 Like

Thanks for the help.

I thought maybe there would be solution in mappview directly without the need of extra code.

2 Likes