Fire Event dynamically?

Hi all, first of all, excuse my bad english. :slight_smile:

I am new to Axure and got a lot of questions and problems solved by either reading the guides or the solutions in this great forum. But now I ran into a problem that I cannot solve myself.

I have build a custom menu. In this menu every menu item can be marked as a favourite menu item by clicking on an separate icon (a star with two states) next to the label of the menu item. By clicking that icon a corresponding button is shown on the main page (dashboard) or will be hidden again. That works fine.

Now I would like to realize a second way to add a button (for the favourite menu item) to the main page. I have build an overlay (lightbox) that appears by pressing a button shown on that page. That overlay contains a custom droplist via repeater and that repeater contains all of the menu items. By selecting one of the repeater items the name of the menu item is stored into a global variable. Also I have put a button inside the overlay named “Add”. By clicking that “Add” I would like to read the content of the global variable and fire an event on the corresponding “favourite icon” in the menu to add the concrete button to the main page.

Therefore I can only fire an event on a specific widget I would like to know if there is a way to realize that by using the action “Miscellaneous - Other” and put a script there? That script should read the name stored in the global variable and would fire an event to the needed favourite icon in the menu.

Thanks a lot for reading my question.

Kind regards
Christian

Hi @urban,

I am not sure to well understand what you want to achieve but the part:[quote=“urban, post:1, topic:54878”]
read the name stored in the global variable and would fire an event
[/quote]

seems like a condition (if/else).

So Onclick on your “Add” button you have to create a case for each value of the variable:
if variable = 1, do Action1
else if variable = 2, do Action 2

Hope it’ll be useful,

Best,

1 Like

Hi Pierre,

thanks a lot for your hint. That works fine and solves my problem. I was thinking a bit too complicated, I guess.

Have a nice day,
Christian

Nice,

Have a nice day too :smile_cat: