SPJS-CASC Filter Options

Forums Requests SPJS-CASC Filter Options

Viewing 10 reply threads
  • Author
    Posts
    • #15657
      Kasey
      Participant

      Would you consider adding a “Filter Field” and “Filter Value” to the Cascading Drop downs plugin? This way you could use one list for multiple Cascading Drop Down configurations ore even use it to temporarily disable options by adding an Active flag field.

      I emailed this to you but wanted to post it for your records.

      Love the recent enhancements. Thank you for continuing to improve upon your already excellent solution.

    • #15712
      Alexander Bautz
      Keymaster

      This is a good idea and I’ll try to get it done soon.

      Best regards,
      Alexander

    • #19881
      Ivan Wilson
      Participant

      Is there any trick to apply more than one filter for a cascading dropdown, even if it needs to be done when the results have been returned?

    • #19908
      Alexander Bautz
      Keymaster

      I’m not sure I understand exactly what you mean, but if you need to change the dataset based on other fields in your list you can call the function manually as described here.

      Alexander

    • #19914
      Ivan Wilson
      Participant

      Can you use multiple filter criteria when you call spjs.casc.init? I tried using the following syntax for the filter option, but the operation failed:

      “filter”:[{“filterField”:”Title”,”filterValue”:”testing”,”operator”:”ne”},{“filterField”:”Country”,”filterValue”:”New Zealand”,”operator”:”eq”}]

      Or is there another option for updating the results of this call?

    • #19925
      Alexander Bautz
      Keymaster

      Sorry, but only one filter criteria can be used at the moment. Maybe you can create a calculated column in the list to filter on?

      Alexander

    • #20450
      Ivan Wilson
      Participant

      Unfortunately I need to filter based on the properties of the current user, so I can’t implement as a calculated column.

      I’m trying to use a Jquery statement to remove the option from the DOM, but I’m having problems figuring out where to place this. I’ve tried calling it from a rule that runs when the form is ready or initialized, but in both cases, it seems like the DOM hasn’t been populated with the cascading dropdown values yet. Any suggestions?

      • #20468
        Alexander Bautz
        Keymaster

        I’ve added an option to use a CAML query. You find the file here. Replace the file in the “/SPJS/DFFS/plugins” folder and change your filter parameter to a CAML query.

        Let me know how this works out.

        Alexander

    • #20481
      Ivan Wilson
      Participant

      Thank you Alexander, that works perfectly.

    • #20488
      Alexander Bautz
      Keymaster

      Thanks for the feedback – I’m glad it worked out.

      Alexander

    • #20494
      Ivan Wilson
      Participant

      Hi Alexander, I think there is an issue with the updated code if you use the standard filter criteria. The error appears in line 184 in the call to spjs.casc.init:

      `var c, s, err = false, camlFilter = b.filter.charAt(0) === “<” ? true : false;

      the b variable contains an object, which seems to fail on the b.filter.charAt(0) statement.

    • #20503
      Alexander Bautz
      Keymaster

      Ah – forgot that the filter was an object when using it in Custom JS. I have updated the file to v3.7.13.

      Alexander

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