I have this functions, and my question is is there a way to make the function name dynamic. Because I also have different function name that instead of "DynamicName1" I have "DynamicName2" on it. So i can ba called this.SPClientPeoplePicker.SPClientPeoplePickerDict.DynamicName2Txt_TopSpan.OnControlValidateClientScript
Note: It would be better if I can replace DynamicName1 with a variable
this.SPClientPeoplePicker.SPClientPeoplePickerDict.DynamicName1Txt_TopSpan.OnControlValidateClientScript = function(
peoplePickerId,
selectedUsersInfo
) {
setPPLValue("DigitalMarketingLeadTxt");
};
I know its possible but I cant remember how to do it.