on 2021 May 06 2:42 AM
This post from 2018 refers to the same issue I'm seeing. Is there a way to get the new value of a text field when using the onChange script event? The source.text value the event returns is the old value, which for field validation isn't really useful.
Request clarification before answering.
Hi Elliott,
Here is the solution. When you look at the onChange event in the inspector it says:
It passes variables: source, oldValue and newValue.
You just need to use the variables. So create a script for the onChange event for the GuiTextField. Here is a snippet of code.
session.utils.log("onChange");
session.utils.log('oldValue =>' + oldValue);
session.utils.log('newValue =>' + newValue);
Every time you change the textfield value it displays the oldValue and newValue as expected. Easy as that. Hope this helps. FYI I'm using Personas 3.0 SP11.
Cheers,
Brian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
64 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.