on 11-05-2014 3:24 PM
Hi,
Normal way of write a msg to the Textbox using a script button would be:
-> id-of-a-textbox
Enter Value my-msg
Question:
If there are 2 text boxes, say Textbox1 and Textbox2. Would it be possible to write a msg to either Textbox1 or Textbox2 at the runtime?
Br,
Dong Zhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What I meant is that when write a msg to a textbox in a Script Button, the id of the textbox can be represented by a variable so that at the runtime, whenever the value of the id variable changed, one can write msg to different target textbox using the same script.
-> changeable-id-of-a-textbox
Enter Value my-msg
It seems that this is not possible so far. I was thinking to put the id into a textbox and read it there, but as long as the variable id is not allowed in script, there is no way to put different ids in the same script. Anyway, not a big deal.
Dong
The closest you can get right now is to store your own IDs for the text boxes in your variable and use IFs to write the the selected one:
IF args.textbox = "box1"
Enter Value "message" "Personas/realid1"
IF args.textbox = "box2"
Enter Value "message" "Personas/realid2"
and so on. Then change the value of your "textbox" variable to change where the message is written.
What you're asking for does make sense, and would be neater than this, but this at least lets you do what you're asking for.
As I keep saying a lot these days, you can do this properly in Personas v3.
Steve.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can make a decision with using an IF condition which textbox to write the message into... but I'm sure you know this and I suspect you mean something different.
Maybe something like specifying the target textbox name with a variable? That's not possible as far as I'm aware.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.