Using JS to pull a list of possible values
- This topic has 6 replies, 2 voices, and was last updated 6 years, 6 months ago by .
Viewing 6 reply threads
Viewing 6 reply threads
- You must be logged in to reply to this topic.
Home › Forums › General discussion › Using JS to pull a list of possible values
Tagged: Custom JS
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
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
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>?
Hi,
You should use
Alexander
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.
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”.
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