Hello, I want to trigger my "behaviour" based on the value of a custom field "estimate type". In case this field is empty I want to fire BehaviourA and in case this field is filled I want to fire BehaviourB.
In the setup for Behaviours I can add a "condition" for every field in my behaviour, but all conditions are based on CurrentUser, WorkflowStep or WorkflowAction, not on custom fields (see attached screenprint). How do I define my condition "When Estimate Type is empty", than "fire my BehaviourA"? Thanks.
Hello,
You should write a code to do this. You add the estimate type field to the behaviour. And the you can check if the field is empty like this:
def estType = getFieldByName("estimate type")
if (estType.getValue() == null) {
// the field is empty
}
Alexey, i have many dozen fields in a form, each of them has a behaviour associated. I am concerned that every behaviour will be evaluated when I choose an option on a field. Is this true? Does every behaviour in a form get evaluated each time a field value is entered, with only the one(s) satisfying the behaviour being triggered?
If so, how do I best limit cpu processing on fields which are not in the current context? I have many fields with Yes / No Radio buttons. Based on the option chosen, another field will be hidden or shown. What do you suggest? One long behaviour script for all of these fields, or individual behaviour scripts that may somehow be limited in scope when certain actions are taken?
Many Thanks
Luke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.