Identify list by url/internal Name

Forums Cascading dropdowns Identify list by url/internal Name

Viewing 2 reply threads
  • Author
    Posts
    • #23926
      Andreas Blüher
      Participant

      Hello Alexander,

      vLookup has been updated a while ago to also support getting the list by url, but cascading dropdowns don’t support this yet (afaik).

      Could you please integrate the code into cascading dropdowns aswell?

      Thank you very much
      Andreas

    • #23963
      Alexander Bautz
      Keymaster

      I’ll try to get this in place in a later version, but if you invoke it from Custom JS and not from the Cascading dropdown tab in DFFS backend you can do it like this:

      spjs.utility.getListByUrlName("/sites/yoursite","ProjectList").then(function(list){
          spjs.casc.init(
              {
                  "manualMode":true,
                  "dataSource":"",
                  "lookupList":list.id,
                  "lookupListBaseUrl":list.baseUrl,
                  "lookupListFields":["SourceField1","SourceField2"],
                  "thisListFields":["ThisListField1","ThisListField2"],
                  "dropDownDefaultvalue":"Select...",
                  "filter":"",
                  "hideEmptyDropdowns":false,
                  "autoselectSingleOption":true,
                  "clearInvalidSelection":false,
                  "addOwnValue":false,
                  "addOwnValueMouseover":"",
                  "cancelOwnValueMouseover":"",
                  "sideBySide":true,
                  "debug":false
              }
          );
      });

      Change the base “/sites/yoursite” and the list URL name “ProjectList” (please note that this is case sensitive). Notice how I used list.id and list.baseUrl in the argument.

      Alexander

    • #24263
      Andreas Blüher
      Participant

      Hello Alexander,
      thank you very much for helping out. It worked out great! Thanks

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