Home › Forums › Classic DFFS › Replacement for SPServices.SPFilteredDropDown
- This topic has 4 replies, 2 voices, and was last updated 7 years, 4 months ago by Artaker.
-
AuthorPosts
-
-
June 12, 2017 at 12:57 #16840
Hi!
I’m trying to replace all the SPServices functions I use in my solutions with scripts and funtkions of DFFS.The only function I haven’t found a way to replace effectively is the SPServices.SPFilterDropdown feature. With it you can pre-filter DropDown fields (wrapped into an function that reacts to change I have created a kind of filted CCDD).
The thing is, I need it to be a lookupfield, or something directly linked to the entry in the other list. (It can be single or multi choice…)So right now I have a lookupfield, I need to pre-filter, looking like this with SPServices:
function filterMedJourn (){
var field = $(“input[title=’Country’]”);
var country = field[0].value;$().SPServices.SPFilterDropdown({
relationshipList: “Database”,
relationshipListColumn: “Selection”,
relationshipListSortColumn: “Title”,
columnName: “Object”,
CAMLQuery: “<Eq><FieldRef Name=’Country’ /><Value Type=’Choice’>”+ country + “</Value></Eq>”,
debug: false
});
}Any tips?
ThanksBest regards,
Nicole -
June 13, 2017 at 20:17 #16863
Hi,
Unfortunately I don’t have any replacement for this SPServices method. As far as I know It should’t be any problems using SPServices with DFFS so I suggest you stick with it.Best regards,
Alexander -
July 3, 2017 at 15:10 #17145
Hi!
Oh no you misunderstood – it is no problem to use it within DFFS.
BUT it’s reducing the performance speed of the form.When I use it only to filter one field on the form it’s fine, but when there are many of them, it’s getting slower and slower 🙁
Might there be an function like this in the future?
Thanks
BR,
Nicole -
July 10, 2017 at 18:25 #17207
I see. Unfortunately I don’t think redoing would be able to speed it up. I haven’t actually looked at the SPServices code for this, but guess that it runs a query to the list that the lookup targets to find the ones matching the filter. After this query has returned, it must loop trough all items in the select to remove / hide the ones that is not right.
When bringing multiple filtered dropdowns to the form, it will get slow – especially if the lookups contain many options.
I’m sure you already know this, but if you don’t need the values stored in lookup columns, but are OK with them stored as text, you can use the cascading dropdown plugin.
Alexander
-
July 26, 2017 at 10:24 #17466
Hi!
Thanks for the reply.
And yes I do use the cascading dropdown plugin where I can unfortunately the lookup fields I still use it, need some link to the actual item since might wnat to see additional info to that item not just a name. (And I often have multi value lookup fields, where I need the connection later on for analystics.)
Maybe, if i have time, I’ll try to go over a vLookup field. might even work out.
Thanks
BR,
Nicole
-
-
AuthorPosts
- You must be logged in to reply to this topic.