locked
Is it possible to filter a data connection on a drop down box which is a Browsable Form? RRS feed

  • Question

  • Hi,

    I have one drop-down called BRAND that contains hard coded list items.

    I have another drop down that is connected to Secondary data Connection "Subscriptions" (a sharepoint list retrieve). I essentially want this list to be filtered based on the first list. This list by the way does contain Brand Column.

    I tried the following in the Infopath Brand_Changed event:

     

     

    subscriptions.FileLocation = subscriptions.FileLocation +

    "@FilterField1=Brand&FilterValue1=" + e.NewValue;

    subscriptions.Execute();

    Problem is I get error:

    Unable to cast object of type 'Microsoft.Office.InfoPath.Internal.SharepointListQueryConnectionHost' to type 'Microsoft.Office.InfoPath.FileQueryConnection'.

    Help Appreciated.

    Thanks.

    John


    I have seen SharepointListQueryConnection, but it doesn't look possible to filter.

    FileQueryConnection subscriptions = (FileQueryConnection) DataConnection["Subscription"];
    Friday, September 9, 2011 1:22 PM

Answers

All replies