vLookup Callback Functions with Multiple vLookup Columns

Home Forums vLooup for SharePoint vLookup Callback Functions with Multiple vLookup Columns

Viewing 2 reply threads
  • Author
    Posts
    • #37549
      Kristen Moore
      Participant

        Hi Alexander,
        Is there a way to determine which vLookup column triggered the vlookupChildAddedCallback() function? Our “parent” list has multiple vLookup columns set up, however we only want to run the code in the vlookupChildAddedCallback function for one of the vLookup columns. Currently the function is triggered when a child is added to any of the vLookup fields. Is there a way to check which vLookup is triggering the function, or a way to have separate callback functions for each vLookup column?

      • #37550
        Alexander Bautz
        Keymaster

          The callback from “vlookupChildAddedCallback” does not have any information about the form it return from, but you can use “vlookupAddChildPreCheck” to keep track of it – like this:

          var current_vLookup_fin = "";
          
          function vlookupAddChildPreCheck(fin){
              current_vLookup_fin = fin;
              return true;
          }
          
          function vlookupChildAddedCallback(){
              if(current_vLookup_fin === "vLookupTasks"){
                  // The fin is vLookupTasks - do shomething
              }
          }
          

          Alexander

        • #37551
          Kristen Moore
          Participant

            This works perfectly. Thanks so much Alexander! Really appreciate your help.

        Viewing 2 reply threads
        • You must be logged in to reply to this topic.