Forum Discussion

Ahmed_Amin's avatar
Ahmed_Amin
Copper Contributor
Apr 14, 2020
Solved

ProjectServer PDP - Set Field Value Based on Lookup field selection

Hi,

I am trying to add JavaScript code inside Project Server PDP, that sets custom field value based on lookup table value selection.

I tried many JavaScript Events (onchange, onselect, etc..) all events not firing on the lookup table custom field.

 

The main idea is to simulate the showing/hiding fields in PDP(based on the selected value of Department field (or any other field but rather than showing/hiding i need to set field value.

 

Thanks & Regards

  • Finally i found how to do so, by attaching an event to the custom field as follows:

    FieldID.on('Event', function(e){
    e.target}, true);

    // true force event to run on child elements.
    // target --> gets the child that fired the event.

1 Reply

  • Ahmed_Amin's avatar
    Ahmed_Amin
    Copper Contributor
    Finally i found how to do so, by attaching an event to the custom field as follows:

    FieldID.on('Event', function(e){
    e.target}, true);

    // true force event to run on child elements.
    // target --> gets the child that fired the event.

Resources