Skip to main content

I’m using the webui::requestPerformWebUIDialog a lot, for example for saving specific voyages. I would like to be able to add extra input arguments to the onDone procedure, such that I don’t need messy global parameters for that. Also there is a risk that other developers call the onDone procedure directly without initializing eVoyageToSaveUI properly. Also see example below.

Can you add support for an extra (string) input argument for the onDone procedure, for example by adding a onDoneArgument to the arguments of webui::requestPerformWebUIDialog?

Hi Sander!

 

Your request certainly makes sense, I will report it internally in our ticketing system.

 

As a (creative) workaround, you could (ab)use the description of the onDone argument from the manual:

The procedure should have a single input string parameter as argument. When a user selects an action, the onDone procedure is invoked with the action name as its argument.

 

So, a way to get your _eVoyage parameter to the onDone procedure, would be to have an action which reflects the value of _eVoyage in its name… I just tried this out with this code in a model of my own:

 

 

This calls the ‘MyOnDone’ procedure with ‘Save v1 as original’ as its string input argument. Then it only requires some ‘string peeling’ in the ‘MyOnDone’ procedure to obtain the right voyage number. Agreed, a bit unorthodox, but it does work:).

 

Mischa

 

 


Updated idea status NewDiscussion ongoing
Discussion ongoingOn Backlog

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

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