Compound filter on drop-down list. - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Compound filter on drop-down list.

Last post 10-27-2011 01:13 PM by shniggens. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-27-2011 12:35 PM

    Compound filter on drop-down list.

    I have a drop-down that pulls venue information from a sharepoint list.  Currently it is filtered to only pull in venues where @ State = State (another field in my form).   This works fine. 

    The problem is, in some areas, say Washington, DC, we may need a bigger radius than just state. 

    So I tried adding more filter to it

    Sharepoint State = Form Field State (the basic filter) or

    Form Field State = "DC" and

    SharePoint State = "DC" and

    SharePoint State = "MD" and

    SharePoint State = "VA"

    But it still only uses the basic filter (State = State)

    Any suggestions or workarounds?

     

  • 10-27-2011 12:42 PM In reply to

    Re: Compound filter on drop-down list.

    There's a problem with your logic.  What you need is

    FormFieldState = "DC" AND (SharePointState = "DC" OR SharePointState = "MD" OR SharePointState = "VA")

     But since AND has a higher precedence than OR, you can't just fix this by switching two of the ANDs with OR.  Your options are:

    Change the OR part to be one expression:

    FormFieldState = "DC" AND

    SharePointState = "DC" OR SharePointState = "MD" OR SharePointState = "VA"

    Or make it three separate filters

    FormFieldState = "DC" AND

    SharePointState = "DC"

     

    FormFieldState = "DC" AND

    SharePointState = "MD"

     

    FormFieldState = "DC" AND

    SharePointState = "VA"

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-27-2011 01:02 PM In reply to

    Re: Compound filter on drop-down list.

    That works great by itself, but if the form field does not equal DC, I need it to just match states (State = State).   When I add State = State at the end of the filter, it just uses that filter only.

  • 10-27-2011 01:13 PM In reply to

    Re: Compound filter on drop-down list.

    Never mind I figured it out.  The State = State filter needs to be "or"'d at the end of the other ones.  It works great now.  Thanks.  I owe you a beer.

Page 1 of 1 (4 items)
Copyright © 2003-2018 Qdabra Software. All rights reserved.
View our Terms of Use.