• 3 replies
  • Latest Post - ‏2014-02-04T09:21:25Z by RISHIVEMAL
8 Posts

Pinned topic Set web dependency for list box

‏2014-02-03T13:52:48Z |


I'm trying to set web dependency to a list box. I understand that we have web dependency property option for drop down combo box. Is there a way to set web dependency through perl script?



  • DonaldN
    287 Posts

    Re: Set web dependency for list box


    If you are talking about changing values for one field would automatically change that of another field "on the fly", then no, list box is not supported. Your only choice is among those "drop down" variants.

    But if you are interested in modifying the value set of a field based on another field, you can always do it in the validation hook, with the condition that the user has to click the "save" button to trigger the validation hook.

  • CQAdmin
    103 Posts

    Re: Set web dependency for list box


    If you are trying to modify the value of one field based on the value of some other field, you can write the Validation hook code.

    For Example-

    There are two fields in my schema "Component" and "SubComponent". If "Component" has a value "Comp1"; "SubComponent" field should get a value "SubComp1".

    The below hook code has to be written in the Value Changed Hook Code for the field "Component".

    # Value Change Hook code for "Component"
    $session = $entity->GetSession();
        my($comp) = $entity->GetFieldValue($fieldname)->GetValue() ;
        if ($comp eq "Comp1" )
        $entity->SetFieldValue("SubComponent", "SubComp1");

    8 Posts

    Re: Set web dependency for list box


    Thanks DonaldN and CQAdmin for your reply.