I wish Axure could do this

I want to be able to set a widget Target from a Global Variable.
Here’s the USE case; It’s a turnkey touch screen UI. The UI design has lots of Text Entry fields. I have a keypad which is shown and brought to the front when a text entry field is Clicked On. The user keys in the entry then hits an OK button and then I’d like it to put the entry into the originally clicked on text entry field.
Right now I do not see how Axure can do this. :frowning:

It would be so cool if I could see Globals in the Target list! :thinking:
Of course it would have to verify that the text in the global is a valid Target.

Hi AndyCohen,

It looks like you may be able to do something similar by creating some conditional logic to check what the value of a global variable is as the keypad’s widgets are pressed. When the text fields are initially pressed, you can set the global variable to equal a value of “[[This.name]]”, and then use the conditional logic to check what that name is. This will help to target different text field widgets with the same keypad.

Please feel free to review this sample file: keypad sample.rp (52.6 KB)

More information on setting a global variable value in this way can be found here:

I hope this helps!

@AndyCohen, I’ve done just this with custom keyboard designs for devices with custom embedded UIs. Here is my basic method:

  • Layout the keyboard with it’s own temporary text field. When a key is pressed it appends it’s contents to this temp field, as in Set text to [[LVAR1.text]][[This.text]] where LVAR1 points to the temp field.
  • Add conditional cases to the temp field’s Text Changed event to validate the text entry, handle errors, and so forth, e.g., length of input, alpha only, password match, prefill search, etc.
  • Create a Master from this, so all input fields and pages can use the same keyboard (or set of keyboards.)
  • If the text on the temp field is valid, the last “ELSE IF” case sets the text on the real text field to match the temp field by raising an event to the page. That page event can then set the text on the focused widget to the text on the temp field in the keyboard master. In the Set Text action, one of the possible targets is “Focused Widget”. In this way, the code doesn’t need to keep track of which input field is in use.
  • On my page, I would set up my text field widgets, then drag in my keyboard master, typically convert it to a dynamic panel, size the panel down so the temp field is not shown, and hide the whole panel by default. The page would get new events from my master (e…g, InputError and InputUpdate) which I can use to set or clear text input, show error messages, confirmations, etc.
  • To summarize, When a user clicks in or otherwise selects a text field, it gets focus, and in turn the Focused event of that text field shows the keyboard (and if there is already text entered, it sets the contents of the temp field to match.) When keys are pressed on the keyboard, text entry first goes to the temp field. That temp field validates input and passes errors or success up to the page via “raised events” (look in the Axure documentation for help on Masters if needed.) These events can then update the focused widget (the text input field selected by the user) --and all this happens quick enough for a good user experience.

If you want to see an example, I can probably dig up some of my keyboard files and “genericize” one–it’s been awhile.

Ooo. Thanks! Good ideas.

So I tried it and… Yup! It works! You rock!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.