You are viewing limited content. For full access, please sign in.

Question

Question

How do I create a field rule using a field that is populated by a lookup rule?

asked on November 19, 2015

Can anyone tell me how to create a field rule using a field that is populated by a lookup?  I have fields called Active, Select a Policy and Exceptions.  Active is defaulted to 1.  Lookup rule is When Active equals 1 fill Select a Policy field with the PolicyName database field.  But now I can’t create a field rule that says Hide Exceptions when Select a Policy is not Conflict of Interest (only policy that needs this field to show).  Because the Select a Policy field is autopopulated, I can’t put anything in the box for the rule.

 

 

1 0

Replies

replied on November 19, 2015

You can show or hide fields with JavaScript in this scenario.

A less robust solution, but one you can do with the Field Rules UI, is to edit your "Select a Policy" drop down field and manually specify certain choices that you want to have field rules based off of. Then when the lookup rule runs, it will still display the available values in the drop down correctly and when selected, the field rule should still trigger.

0 0
replied on November 19, 2015

You can do this with Javascript. Use something like this, replacing the items in the "<>"s with the field ids, class names, or values:

$('<select a policy field> input').on('change', function() {

   if ( $(this).val() != <whatever value you want> ) {

        $('<exceptions field>').hide();

   }

}

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.