I have a mockup numberpad that takes the initial input from a selected text field and inserts it into the numberpad which is in a separate Dynamic panel(because it is used by lots of other text fields). I inserted the name of the originating text field into a global variable. The user enters or modifies the numbers then hits “OK” on the Numberpad… and now I want to put the user’s changes into the originating text box. I do not see that Axure will let me address a widget using a variable value which contains the widget name.
Any ideas how to do this? or am I asking for Axure to do too much?
You are not asking Axure to do too much, but you are asking for something it currently cannot do. You can submit this as a feature request, though
The only way I know to do this is to test the value of your global variable with some conditions. Let’s say you have three possible text boxes named, “Text1”, “Text2”, “Text3”. The Click event for your OK button would have three cases with at least two conditions:
- If value of FieldVar contains “1” set text of “Text1” to value of [[OK.text]]
- Else If value of FieldVar contains “2” set text of “Text2” to value of [[OK.text]]
- Else set text of “Text3” to value of [[OK.text]]
Doing it that way couples the field names in code to the numberpad object. That’s fine for just a handful of fields, but when it’s potentially much more, or even open ended, then that hard coding will quickly become cumbersome.
What’s “too much”? Too much is when we keep adding functionality to the point when we are no longer building simplified wireframes and instead are doing full development. Not that I would mind that. However there are already excellent cross platform tools for that.