I've used this Javascript to try to implement it:
("[[preferred_first_name]]" == "undefined") ||
(("[[preferred_first_name]]" != "undefined") && ("[[preferred_first_name]]".toUpperCase() != "[[last_name]]".toUpperCase() ))
and also:
!(id_preferred_first_name.getValue()) ||
(id_preferred_first_name.getValue() && ("[[preferred_first_name]]".toUpperCase() != "[[last_name]]".toUpperCase() ))
This works up to a point: if I enter a value in preferred_first_name that's the same as last_name, the validation message appears as expected, but if I then CLEAR the preferred_first_name field, the message remains visible, and the form may not be submitted.
So clearing a value fails to trigger a validation refresh.
1. why would clearing a value NOT trigger a revalidation?
2. what are my options here?
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.
Thanks Gareth, I appreciate the detailed response. The manual listener seems to get a step closer to a solution - it fires when a variable is cleared, the name_validation variable is assigned the correct value, but the validation error message remains visible, and the form cannot be submitted.
The specific case I'm looking at is when users wrongly enter their last name as their preferred FIRST name (this has happened surprisingly often). The obvious solution for them (once warned) is to delete it. But the system has to support re-validation on variable clearance to implement this, which it does not (easily, or at all).
I'm going to fix this server-side by wiping preferred first names that are equal to last names there instead.
Could I log a feature request: that the client Javascript library should implement sensitivity to variable clearance for dependent validation rules, activity rules, visibility rules and listening JS widgets. It is not logical to consider clearance of a variable as anything other than a material change to its value, one which should have an automatic impact on all dependent validation rules, activity rules, visibility rules, and listening Javascript widgets.
Gareth, I feel myself slipping down a rabbit hole. The general use case is simple: a field may be empty, or if it has a value, it should satisfy a condition. From a user's perspective, the simplest way of correcting the entry of an invalid value is to delete it, thereby making the value empty but valid.