Is it possible to do a password entry in the webUI

  • 31 August 2023
  • 3 replies

Userlevel 5
Badge +7

In the winUI of AIMMS, there is the DialogGetPassword function that will create a dialog window with a masked input that can be used to retrieve passwords.


Is there any way I can achieve the same in the WebUI at the moment? 

If not directly supported by AIMMS, I could think of a bit of Javascript that could find the right input tag and modify the type from text to password. Is this possible within the webui? To add som custom javascript that is running on the page?

3 replies

Userlevel 5
Badge +6

Hi @gdiepen, there is no DialogGetPassword for WebUI, at least not yet. But there is a workaround: create a dialog page and hide the string through css.   

Userlevel 4
Badge +5



Maybe even better, try to avoid the use of passwords altogether, and go SSO. I don't know what exactly you need the password for, but many services now support OAuth, and DEX will allow you to perform an Authorization Code flow from within your model, both locally, on-prem and in the cloud. 

Userlevel 5
Badge +7

@MarcelRoelofs the use case here is for simple demo where I want to demonstrate aimms can get input data from different sources. In theory I might be able to connect to this odbc source with single sign on, but honestly with other applications have never even tried.


I did not want to include credentials hard-coded in my application so when giving demo would just want to get the password from the user. I have also implemented the same database in a sqlite file but for demo purposes it is stronger if I can show it gets the data directly from the central database

One alternative I could use is store the password in environment variable during demo.

If I would like to dynamically change items in the webui, is there a way to place a Javascript file somewhere in the resources folder and let that execute to change type from text to password? 


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator