Question about filtering SQL data - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Question about filtering SQL data

Last post 10-09-2014 09:43 AM by kenger. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 10-08-2014 10:43 AM

    • kenger
    • Not Ranked
    • Joined on 10-08-2014
    • Posts 4

    Question about filtering SQL data

    Hi there

    After spending a whole day with trying to make a SQL connection to work, I'm almost giving up.
    I'm using InfoPath 2010, Browser-enabled Form (deployed to Sharepoin 2010)
    I previously created a SQL receive data connection to a table, lets call it PhoneNumbers.
    The table has the following columns: id, phonenumber, department
    In my InfoPath, I have a dropdown list with department names, and a dropdown list for my phonenumbers.
    The department names is hardcoded values.

    I bind the data connection to the second dropdown, and in it's properties I adds a filter that says "(SQL)department = (field)department"
    I add a action event to the first dropdown, so when department is changed it query's the data connection.

    Everything works.. and I have no problems with publishing it to my Sharepoint.. my problems comes here 3 weeks later..
    I needed to create a new filteres dropdown, another table, or this time it's a view.
    I setup everything like I did with the numbers.. my preview works fine.. but when I try to publish it, I'm getting this error:
    "The form template has been published to the server but it can only be opened in InfoPath Filler because it contains features that are not compatible with Web browsers"
    In my Design Checker, it only says:
    "Count not verify the form template on the target server...... http://......./_vti_bin/FormsServices.asmx"

    So here is my question.. why can I have another SQL filtering, when the first one worked?
    I did published the data connection to the sharepoint external connection list, and I did approve it.
    I tried it over and over again.. nothing makes sense.. I started from scratch, and with another SQL table.. I got it to work.. but when I changed it to my view, nothing works..
    What "requirements" does filtering of a SQL data source have?, does it need a ID/primary key.. is only tables supported?
    And one last important info.. as soon I remove the filter, it works.

    Regards
    Kenneth
  • 10-08-2014 04:46 PM In reply to

    Re: Question about filtering SQL data

    Hi - I'm guessing the issue may be in the filter on the dropdown not on the view itself. If you just have the data connection to the view and don't set up your dropdowns, do you continue to get the design checker error where it claims it can't verify on the target server?

    I don't think you need to re-query the SQL data connection when the department changes, by the way - do you query the data connection on load? InfoPath doesn't have any built in functionality to add a "where" clause to a SQL query - with a SQL connection, you get back everything in the table - the reason you don't see everything in your second drop down is the filter. I think you may be executing the query more often than you need to. :)

    Hilary Stoupa

  • 10-09-2014 12:00 AM In reply to

    • kenger
    • Not Ranked
    • Joined on 10-08-2014
    • Posts 4

    Re: Question about filtering SQL data

    Hi Hilary

    As soon I remove the filter, it works just fine.
    I removed the action from the department dropdown, and changed the data to load on start.. but still gets the same error if I put on a filter.
    Even if the filter is a hardcoded value (text or number) I get the same error.. is this somekind of infopath corruption?

    Regards
    /kenneth
  • 10-09-2014 05:11 AM In reply to

    • kenger
    • Not Ranked
    • Joined on 10-08-2014
    • Posts 4

    Re: Question about filtering SQL data

    Hi again

    I created a whole new infopath form, and recreated the data connections again, as I did many times before..
    this time everything works.. I guess that my original formular has an error somewhere.. I have no idea of how to find it.. any ideas?
    Regards
    Kenneth
  • 10-09-2014 07:14 AM In reply to

    Re: Question about filtering SQL data

    May I see a copy of your form? Just attach it under the Options tab in a reply.

    Hilary Stoupa

  • 10-09-2014 09:43 AM In reply to

    • kenger
    • Not Ranked
    • Joined on 10-08-2014
    • Posts 4

    Re: Question about filtering SQL data

    Hi :)

    I tried to perform the same changes to the original formular, this time on another pc.. and now there are no problems.. I have no idea of what is going on.
    But it works.. looks like it's a local infopath designer issue.. but what a mess.. thanks for trying to help Hilary.

    Regards
    Kenneth
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.