Using JS to pull a list of possible values

Forums General discussion Using JS to pull a list of possible values

Tagged: 

Viewing 6 reply threads
  • Author
    Posts
    • #29890
      Paul Heffner
      Participant

      I am trying to create a field that will only allow a list if ID’s that are visible in another list’s view.

      Hope this makes senze

    • #29917
      Alexander Bautz
      Keymaster

      Hi,
      Sorry for the late reply. Are you looking to create a dropdown select with a value from a field in this specific list view? – if so, you can use this plugin and use the filterObj > CAML query to create a filter matching the one used in the list view: https://spjsblog.com/dffs/dffs-plugins/spjs-lookup/

      Let me know if you have any questions.

      Alexander

    • #29929
      Paul Heffner
      Participant

      Thank you for the reply. I do not know CAML but I am willing to learn. I have a strong background in SQL. When adding the CAML to filter, what tags do I need? Should I start with <query> or just <where>?

    • #29931
      Alexander Bautz
      Keymaster

      Hi,
      You should use …your_caml…

      Alexander

    • #29934
      Paul Heffner
      Participant

      seems I can’t get the lookup working even without the CAML. What is error 80020101?

      I have gone over the example and input my values but can’t seem to get it.

    • #29936
      Paul Heffner
      Participant

      I finally got it working without limiting the list. Now, I need to show the items where today is between the “Request Date” and “Decision Date”.

    • #29942
      Alexander Bautz
      Keymaster

      You can try it like this:

      <Where>
      <And>
      <Geq>
      <FieldRef Name='RequestDate' /><Value IncludeTimeValue='FALSE' Type='DateTime'><Today /></Value></Geq>
      <Leq>
      <FieldRef Name='DecisionDate' /><Value IncludeTimeValue='FALSE' Type='DateTime'><Today /></Value></Leq>
      </And>
      </Where>

      Please change RequestDate and DecisionDate to match your internal names, and write the CAML as one continuous string wrapped in double quotes when you use it in the function call.

      Alexander

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