spjs-lookup with datasource

Forums SPJS-Lookup spjs-lookup with datasource

Viewing 4 reply threads
  • Author
    Posts
    • #29445
      Kasey
      Participant

      I was wondering if it was possible to call spjs-lookup using a datasource like you can for casc? I have 11 drop downs I am converting all using the same lookup list filtered by a metadata field. It would be more efficient to pull the list once and filter it client side instead of making 10 calls to the same list.

    • #29454
      Alexander Bautz
      Keymaster

      I haven’t built in functionality for that in this script, but you can use the casc script with only one level – let me know if that works for you.

      Alexander

    • #29458
      Kasey
      Participant

      Tried that first but I have no way to order by my “SortOrder” column. I have some field values that start with numbers and some that dont so I can’t use the alpha sort on the option 🙁

    • #29460
      Alexander Bautz
      Keymaster
      • #29462
        Kasey
        Participant

        I did look at it but wasn’t sure if I could or how to use it to sort on a different field within the lookup list. Due to the nature of the lookup list I have to be able to define the order for each specific option.

    • #29464
      Alexander Bautz
      Keymaster

      I see. Not sure if this is possible with your datasource, but have you tried using the pipe delimited options (in a multiline plain text field)? – this way your datasouce could be stored in one list item even if it is hundreds of options – and this way the sort order is exactly as you type them into the textarea.

      You would still have to run 10 queries to fill the dropdowns, but when the query only pulls in one list item it should be pretty lightweight.
      Alexander

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