SOLVED

ProjectServer PDP - Set Field Value Based on Lookup field selection

Copper Contributor

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

1 Reply
best response confirmed by Ahmed_Amin (Copper Contributor)
Solution
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 best response

Accepted Solutions
best response confirmed by Ahmed_Amin (Copper Contributor)
Solution
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.

View solution in original post