Filtering before data reaches infopath form - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Filtering before data reaches infopath form

Last post 03-17-2021 12:28 PM by TerryH. 17 replies.
Page 1 of 2 (18 items) 1 2 Next >
Sort Posts: Previous Next
  • 03-05-2019 12:41 AM

    Filtering before data reaches infopath form

    Hi all, I was wondering if there is a way to filter data before it reaches the form as the size of data is causing the form to crash and has become unusable. We are searching by a unique field where it pulls in 10 fields worth of data to autofill the form. We are using Sharepoint Online and i've seen in various places the data connection can't be changed or made larger in size. Sorry if this isn't very descriptive, i'm very new to infopath!!
  • 03-05-2019 07:35 AM In reply to

    Re: Filtering before data reaches infopath form

    If you are searching on a unique field - is it an equivalence filter? Can you change the data connection to not run on load, then add form load rules, set the query field to the correct unique value and execute the query (or do that at the time the unique value is known, if not on form load?)
    Hilary Stoupa

  • 03-05-2019 07:52 AM In reply to

    Re: Filtering before data reaches infopath form

    Hi Hilary, it pulls the data once a Unique Id has been entered (a staff number) then it searches a master list and pulls the data from there. It doesn't pull up all data on form load.
  • 03-05-2019 08:10 AM In reply to

    Re: Filtering before data reaches infopath form

    And you still have too much data? How many matches do you have on your unique id? You are using a query field in your list data connection?
    Hilary Stoupa

  • 03-06-2019 12:54 AM In reply to

    Re: Filtering before data reaches infopath form

    Well there is only 1 staff number per person but we can have up to 5,000 users details. Once the staff number has been entered, it pulls first name, last name, phone number, section, line manager and address as well.
  • 03-06-2019 07:48 AM In reply to

    Re: Filtering before data reaches infopath form

    So, what I don't understand is why you are pulling all 5,000 users details into the form? Are you setting the staff number query field in your SharePoint List data connection prior to executing the query?
    Hilary Stoupa

  • 03-06-2019 08:03 AM In reply to

    Re: Filtering before data reaches infopath form

    I might be getting confused, like i said on the top thread i'm very new to this! The error we get (bear in mind i didn't build this, i just got told to fix it!) "The amount of data that was returned by a data connection has exceeded the maximum limit that was configured by the server administrator. Form elements, such as drop-down lists, may be blank." But with this being SharePoint Online we can't make the data connection limit larger. Is there a way round this?
  • 03-06-2019 08:31 AM In reply to

    Re: Filtering before data reaches infopath form

    :-) Can I see your form? You can attach it under the Options tab to a reply. I think you are not setting the query fields prior to running the query - you should be able to get just one row back from your list if your ID is unique.
    Hilary Stoupa

  • 03-07-2019 02:02 AM In reply to

    Re: Filtering before data reaches infopath form

    Unfortunately due to data protection i've been informed I can't share the form with you. Not helpful i know! :-(
  • 03-07-2019 07:59 AM In reply to

    Re: Filtering before data reaches infopath form

    Do you know what I mean when I say the query fields in the data source? If you look at the data source for your secondary data in the fields task pane, there should be data & query fields - Can you find those? Can you tell me if your unique id field (staff number) is there in the query fields?
    Hilary Stoupa

  • 03-07-2019 08:29 AM In reply to

    Re: Filtering before data reaches infopath form

    It pulls from the users work email address. The issue we're having is we're using a web based version and the data connection limit can't be raised in size. I've spoken to the team who built this and they've read through this thread and can confirm the unique ID field is there. Sorry if this is all vague!!
  • 03-07-2019 08:47 AM In reply to

    Re: Filtering before data reaches infopath form

    Look - I understand what you are saying about the data connection limit. I get that. :) You have explained that adequately. What I don't understand is if you are understanding my suggestion. Because if your form is querying the list correctly, it should only pull back the rows from the list where the email matches, and the data limit shouldn't matter. Did you read my last post? Do you understand what I mean when I ask you about query fields in your list connection? I'm sorry if I'm not being clear - I literally know of no other way to explain what I mean. Here is a blog post that may help you: https://wonderlaura.com/2011/08/01/infopath-query-specific-sharepoint-list-data/
    Hilary Stoupa

  • 06-04-2020 01:22 PM In reply to

    • TerryH
    • Not Ranked
    • Joined on 06-03-2020
    • Posts 3

    Re: Filtering before data reaches infopath form

     Hello.  I am have the same problem that you have helped others with in the past.  I am hoping you can do the same for me.  My form is attached.  I am using an AD with about 2500 users to autofill fields on a form for use in a SharePoint list.  I must be applying filters incorrectly.  Any assistance will be greatly appreciated. 

  • 06-04-2020 02:29 PM In reply to

    Re: Filtering before data reaches infopath form

     Here's a copy of your form with a couple of changes. Save the linked file locally, then right click and select Design - from there you can preview / publish.

    You may find that the change I made on your "Query Data" button doesn't work in Preview, but does when the form is published. That's because it is setting the "Account" query field in the User Information List to the userName() function - in the browser and in the user information list, this may be different than what is returned in Filler. I also added a little test area for you - there are query fields, a button that runs the query and a repeating table. You can try different things in the query fields and click the button to get a better feel for how they work.

    I removed the XPath filters you had on your set data rule - by setting the account Query field and then running the query, the only row that should be returned in that data connection will be the one for the user who currently has the form open.  

    Hilary Stoupa

  • 03-16-2021 10:58 PM In reply to

    Re: Filtering before data reaches infopath form

    Dear Hilary, i have follow the blog post because my form encounter Critical error where the form unable to load. The issue seems to be be resolved after i untick automatically retrieve data when the form is opened at the Data Connection and follow the steps in blog post to load the data. But another issue appear where the field which is cascade down from another list appear as ID instead of the display name.
Page 1 of 2 (18 items) 1 2 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.