Replacement for SPServices.SPFilteredDropDown

Forums Dynamic Forms for SharePoint Replacement for SPServices.SPFilteredDropDown

This topic contains 4 replies, has 2 voices, and was last updated by  Artaker 3 months, 3 weeks ago.

  • Author
    Posts
  • #16840

    Artaker
    Participant

    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?
    Thanks

    Best regards,
    Nicole

  • #16863

    Alexander Bautz
    Keymaster

    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

  • #17145

    Artaker
    Participant

    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

  • #17207

    Alexander Bautz
    Keymaster

    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

  • #17466

    Artaker
    Participant

    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

You must be logged in to reply to this topic.