Create two input windows

Create two input windows

brad.bylls
Collaborator Collaborator
740 Views
3 Replies
Message 1 of 4

Create two input windows

brad.bylls
Collaborator
Collaborator

I am try to create two input windows. 

The first is a drop-down input.

The user makes a selection and the window closes and another input window opens with information populated with information based on the user's input from the first window.

Brad Bylls
0 Likes
741 Views
3 Replies
Replies (3)
Message 2 of 4

nnikbin
Collaborator
Collaborator

Hi @brad.bylls 

 

You can create two CommandDefinitions, one to get the user selection and one for showing the information.

On execution of your first command you can call the execute method of your second CommandDefinition using CommandDefinition.execute method.

 

If you prefer to not allow the user to run your second command directly, you simply should not add it to any toolbar or menu. Just create a CommandDefinition using CommandDefinitions.addButtonDefinition method.

 

I think the simplest way to pass information between the two commands is creating add-ins instead of scripts. Add-ins stay active, so you can share the information between its commands.

Also usign UserInterface.commandDefinitions you can get the list of all commandDefinitions and get any commandDefinition using CommandDefinitions.itemById method.

0 Likes
Message 3 of 4

nnikbin
Collaborator
Collaborator

I also suggest you think about using one window instead of two. Perhaps it will be feasible in your case. In many cases it will be enough to have just one window and control what is visible in it using isVisible property of different CommandInput objects (especially GroupCommandInput and TabCommandInput objects)

0 Likes
Message 4 of 4

brad.bylls
Collaborator
Collaborator

There is no button to mark as solved.

I tried on Chrome and Edge.

Thanks for the help.

Brad Bylls
0 Likes