Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag? - InfoPath Dev
in

InfoPath Dev

Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

Last post 07-29-2011 01:03 PM by johnnyr. 22 replies.
Page 1 of 2 (23 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-19-2011 08:03 AM

    Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Hello all! I have a problem that has been driving me crazy. I have two dropdowns. One titles Category, the other titled Service Description. They both get their data from a sharepoint receive connection, a list called service types. This list has 2 columns, Category and Service Description. The Category dropdown get's its data from the Service types list and return categories. The Service Description gets it's data from the service types list and returns the service description, but with a filter of only showing services who's category matches what is in the Category dropdown. This all works fine, except that when I change one of the dropdowns, the form flashes, as though it's refreshing data, and causes a pretty noticeable period where you can't change the dropdowns or really use the form at all (0.5-1 seconds) I'm trying to figure out what is causing this, and how I can get around it. I am loading the data from my receive connection when the form opens as well, so I didn't think there should be any lag? Any help would be much appreciated. Thanks, John
  • 07-19-2011 08:09 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    You may be stuct with this. I am exoperiencing the same issue in a browser based form. What it is doing is send data back to SP I believe and this is causing the delay and flash. What I did which has help some is on each field on the control properties, I had a browser forms tab.and set the option to never send data to the server when the value changes. By default it is set to Only when necessary. I am in 2010, but I believe you still may find a similar option in previous versions.

    Kind regards,
    Larry
  • 07-19-2011 08:17 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Thanks for the tip, I am also using Infopath 2010. Unfortunately, setting these to never does not seem to have an effect on the issue at all =(
  • 07-22-2011 06:40 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Anyone? This problem is going to put me into an early grave =(
  • 07-22-2011 08:08 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Is this browser or client? Do you have "show unique items only" selected on any of your dropdowns involved...?

    Hilary Stoupa

  • 07-22-2011 02:11 PM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Hello, This is a browser form, and I do have "show only unique items" selected on the dropdowns. I just tried unchecking "show unique values"(I have it set for a reason, but wanted to test your idea) but the issue still persists. Its just very unusual!
  • 07-22-2011 02:18 PM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    I've had issues with show unique values & performance in client before, so it was just a thought I had.

    If you remove the filters, does the issue disappear in the browser?

    Hilary Stoupa

  • 07-22-2011 06:06 PM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Hilary, Yes, the issue is not present if I am not filtering the results. But I'm not sure of any other way to do cascading dropdowns without a filter....
  • 07-23-2011 06:04 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    SharePoint 2010, right? There are query fields in list connections now.... so you may want to try a second connection to the list to return the Service Description data. Don't run it on load. When Category changes, set the query field in your list connection to the Service Description to that value, then query the data source. Oh, and set the Service Description drop down to use the new data source.

    I've not actually tried this before - but I remember using a list connection to ShP 2010 and being surprised by the presence of query fields - can't imagine why they'd be there if not for dynamic queries.... Another option for dynamic ShP 2010 queries is a REST connection to the OData ListData.svc, but I'd try the list data connection first, since you have a straightforward "=" scenario.

    Hilary Stoupa

  • 07-25-2011 07:21 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Hilary, Thank you for the suggestion, but I'm a little unclear on how this should work. So I should set a rule on the Category dropdown box, so that when it changes, to set the query field for the second data connection to....what? And I should use the second data connection for the Service Description dropdown, but use the data fields? Thanks for taking the time to help!
  • 07-25-2011 09:56 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    So, you'd have one data connection that your category drop down uses - and another data connection is used by the drop down with the service descriptions.

    You'd set the Category field in the query fields for the new data connection to the value of Category in your main data source (this is going to be in rules on the Category field in your main data source). And then run the query. And the data fields from that second data connection should be used for the drop down options in your Service Desccription - your instinct is correct.

    Hilary Stoupa

  • 07-28-2011 06:37 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Hilary, I've done your suggestion, however the second dropdown (service description) field does not have anything in it. I'm not sure if I did it right, here is what i did:

    -Category Dropdown uses Data Connection 1

    -When the Catagory dropdown changes, a rule says to set the query field for "category" in Data Connection 2 to what is currently in the category dropdown, then to query data connection 2.

    -The Service description dropdown is set to use data connection 2, and is set to display the Service description data field.

    Did I set this up right?

    I should point out that both the data connections point to the same list....is this going to be a problem?

    EDIT: Nevermind, even with two separate lists (one with just categories) the second dropdown still has nothing in it. But, it's obviously filtering in some way, just not correctly =(

    Thank you again for taking the time to help!

    Another edit: I figured out the issue. when I change the filed, it's not querying. If I set a button to do the query, the filtering works. (though the form still flashes)

    Any ideas why the query rule isn't working? This is like pullin teeth =(

  • 07-28-2011 07:36 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Drag the data nodes from your secondary data connection on your second list onto your form so that you can see what data is returned. You won't want any filtering on your dropdown with this method - in theory, you should be returning "pre-filtered" data from you list. If you would like me to take a look at your form, just attach it under the options tab to a reply.

    Hilary Stoupa

  • 07-28-2011 07:57 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Hilary, I figured it out (see my edits above) For whatever reason the rule to query data isn't working on the dropdown.

    I made a button to do the query, and that does work, however it causes the same flash/lag we were trying to avoid in the first place.

    I also realized that your method (while brilliant) won't work for this application, because I have several lines of the same dropdowns. (my fault for not mentioning that) The reason I am not using a repeating table for these is an even more complicated story, but suffice it to say I can't use a repeating table for this particular application.  

     It appears that the reason for the flash/lag is the query. Why that is, I don't know. =(

    I would be happy to attach the form so you could take a look, and it would be very much appreciated!

    Please note that only the first set of dropdowns are using your method, the rest are using my old method.

  • 07-28-2011 08:42 AM In reply to

    Re: Cascading Dropdowns using Filtered Data from sharepoint - causes form to flash/lag?

    Does the rule work on the drop down in the client? If so, you need to adjust your postback settings on the control. But you are right, this type of scenario won't work in a repeating section, or a set up like I see in your form, where you have multiple drop downs bound to the same data source (by the way - next time, you may just want to use a repeating group.... you can set how many instances are included by default in the default values if you need 9).

    I'm starting to wonder if your secondary data source is very large? Lots of rows?

    Otherwise, I'm about out of ideas, I'm afraid..... What happens if you change those combo boxes to drop down boxes - any change?

     

    Hilary Stoupa

Page 1 of 2 (23 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.