0

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.

Hawk
  • 514
  • 1
  • 7
  • 22
  • are you asking about duplicating function to have 2 different names at the same time? you about taking property by string name you compose from several parts? or about forcing code you cannot change to call different function that it calls now? better provide example in meaning "here I have ... I want it to work like ..." – skyboyer Sep 08 '18 at 16:58
  • No the other function "SPClientPeoplePicker.SPClientPeoplePickerDict.DynamicName2Txt_TopSpan.OnControlValidateClientScript" already exist. I know it exists but I just want to call them. Note that "DynamicName2,DynamicName3...etc" is just a name of my DOM – Hawk Sep 08 '18 at 17:03

0 Answers0