Filter a drop-down with more than 5 conditions (Xpath) - InfoPath Dev
in

InfoPath Dev

Filter a drop-down with more than 5 conditions (Xpath)

Last post 05-19-2011 11:20 AM by shniggens. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-18-2011 11:56 AM

    Filter a drop-down with more than 5 conditions (Xpath)

    I have a drop - down list box that gets entries from a secondary data source that I need to filter more than 5 conditions on.   I've tried using Xpath in an expression, but it doesn't seem to be seperating the arguments.  All of the arguments have 2 conditions, IE, field needs to = text, AND @field = >number.  Here's how I tried to do it -

    xdXDocument:get-DOM()/my:myFields/my:SkillSet = "Lighting" and d:Lighting >= 75 or

     xdXDocument:get-DOM()/my:myFields/my:SkillSet = "Audio" and d:Audio >= 75 or

     xdXDocument:get-DOM()/my:myFields/my:SkillSet = "Video" and d:Video >= 75 or

     xdXDocument:get-DOM()/my:myFields/my:SkillSet = "IT" and d:IT >= 75 or

    (xdXDocument:get-DOM()/my:myFields/my:SkillSet = "Breakouts" and d:Lighting >= 40 or d:Audio >= 40 or d:Video >= 40) or

     or xdXDocument:get-DOM()/my:myFields/my:SkillSet = "Neck-Down"

    Is this the correct way to string them together?

  • 05-18-2011 02:14 PM In reply to

    Re: Filter a drop-down with more than 5 conditions (Xpath)

    In my above scenario, it displays the person if ANY ONE of the Skillset fields is above 75.  So if I pick "Audio" in my dropdown, it displays a person who might have "75" or greater in their "Lighting" field. 
  • 05-18-2011 03:24 PM In reply to

    Re: Filter a drop-down with more than 5 conditions (Xpath)

    I think I would separate them into their own filters - at least for troubleshooting. This one might be causing the problem because you have and 'and' and 2 'or's. xdXDocument:get-DOM()/my:myFields/my:SkillSet = "Breakouts" and d:Lighting >= 40 or d:Audio >= 40 or d:Video >= 40
  • 05-19-2011 11:20 AM In reply to

    Re: Filter a drop-down with more than 5 conditions (Xpath)

    You were right Barbara, that was the rule causing the problem.  Thanks!

     I created a column that totalled the different skill sets, and then just did a greater than on that number.  Better workaround.

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