<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Filtering two listboxes</title><link>https://www.infopathdev.com:443/forums/thread/6757.aspx</link><pubDate>Thu, 03 Nov 2005 08:48:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6757</guid><dc:creator>potpourri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6757.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6757</wfw:commentRss><description>I have problems with applying filter as well :(&lt;br /&gt;&lt;br /&gt;This is the full XPath of the data source for filling in the drop-down:&lt;br /&gt;&lt;br /&gt;/dfs:myFields/dfs:dataFields/dfs:Requests_Sub_Types/@subType[../@listName = /dfs:myFields/dfs:dataFields/dfs:Form_Type/@subTypeList[../@formType = xdXDocument:get-DOM()/my:myFields/my:requestHeadingSection/my:formType]]&lt;br /&gt;&lt;br /&gt;I have a "Form Type" and "Sub Type" drop-downs and I wish to populate with values from sharepoint list "Requests_Sub_Types" from the attribute @subType.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But I have no clue as where to apply the "not(preceding-sibling)" keyword :(&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Any one could help?</description></item><item><title>Re: Filtering two listboxes</title><link>https://www.infopathdev.com:443/forums/thread/6756.aspx</link><pubDate>Fri, 29 Apr 2005 14:16:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6756</guid><dc:creator>Idisis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6756.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6756</wfw:commentRss><description>Hi Agni,&lt;br /&gt;&lt;br /&gt;  Ok I figured out how to apply filters, but I just cant seem to get the one you mentioned to work.  I have my version listbox only display versions associated to the comp_name (thanks btw!), but I still cant get it to filter the comp_name listbox to omit duplicate records.&lt;br /&gt;&lt;br /&gt;Here is what I have tried:&lt;br /&gt;&lt;br /&gt;I place the following expression into the filter:&lt;br /&gt;not(preceding-sibling::dsf:Name/@Component= @Component)&lt;br /&gt;&lt;br /&gt;To my understanding we are saying, if the name of this data element is equal to the previous data element do not include it.  Is that a correct assumption?  When I place this code into the filter it tells me "Reference to undeclared namespace prefix: 'dsf'"... so by the look of it I think you just had a typo for the name space.  &lt;br /&gt;&lt;br /&gt;I changed the code to the following:&lt;br /&gt;not(preceding-sibling::dfs:Name/@Component= @Component)&lt;br /&gt;&lt;br /&gt;Now i get the following message:&lt;br /&gt;"preceding-sibling::dfs:Name/@Component" does not point to a valid location path of a field or group.&lt;br /&gt;&lt;br /&gt;I currently have the listbox mapped to the Components secondary datasource, no to the Component/Name Datafield.  I have also tried mapping it directly to the Name datafield but I get the same error.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Ryan</description></item><item><title>Re: Filtering two listboxes</title><link>https://www.infopathdev.com:443/forums/thread/6755.aspx</link><pubDate>Fri, 29 Apr 2005 05:23:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6755</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6755.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6755</wfw:commentRss><description>Hi Ryan, Welcome to the board&lt;br /&gt;You need not write code in this scenario, you can solve this problem using xpath.&lt;br /&gt;&lt;br /&gt;Map comp_name list box to "dsf:Version"&lt;br /&gt;&lt;br /&gt;Have this filter on it "not(preceding-sibling::dsf:Version/@Component= @Component)". By doing this you are filering duplicates of the Components.&lt;br /&gt;&lt;br /&gt;Select "Value" and "Dispaly name" to be Component.&lt;br /&gt;&lt;br /&gt;Now you should not see any duplicate values in the Component list box.&lt;br /&gt;&lt;br /&gt;Hope this helps.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPathDev India</description></item><item><title>Filtering two listboxes</title><link>https://www.infopathdev.com:443/forums/thread/4638.aspx</link><pubDate>Thu, 28 Apr 2005 22:06:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4638</guid><dc:creator>Idisis</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4638.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4638</wfw:commentRss><description>Hello all,&lt;br /&gt;&lt;br /&gt;  I currently have two list boxes set up on my form (comp_name) and (version).  comp_name reads from a sharepoint list of component names and their versions.  This list could have multiple copies of the same component name.&lt;br /&gt;&lt;br /&gt;for example:&lt;br /&gt;Component Name     Version&lt;br /&gt;Test_1             1.00&lt;br /&gt;Test_1             2.00&lt;br /&gt;Test_2             1.00&lt;br /&gt;&lt;br /&gt;What i need to do is have the comp_name list box filter out duplicate names and make it so when I change the comp_name listbox it will populate the version list box with all versions assigned to that comp_name.&lt;br /&gt;&lt;br /&gt;Right now I have created the following java scripts, but I am really not too sure where to go from here:&lt;br /&gt;&lt;br /&gt;function msoxd_my_comp_name::OnAfterChange(eventObj)&lt;br /&gt;{&lt;br /&gt;        //gets the currently selected comp_name&lt;br /&gt;	var componentField = XDocument.DOM.selectSingleNode("//my:comp_name").text;&lt;br /&gt;&lt;br /&gt;        //queries the datasource for the components list from sharepoint&lt;br /&gt;	var dataArray = XDocument.DataObjects("Components").DOM;&lt;br /&gt;	&lt;br /&gt;        //sets the namespaces to correspond to the sharepoint namespace format (??? i am guessing on this)&lt;br /&gt;        dataArray.setProperty("SelectionNamespaces","xmlns:dfs='http://schemas.microsoft.com/office/infopath/2003/dataFormSolution' xmlns:dsf='http://schemas.microsoft.com/office/infopath/2003/dataFormSolution'");&lt;br /&gt;	&lt;br /&gt;	//selects all versions that are assigned to the component that is showing under the comp_name field&lt;br /&gt;	var dataList = dataArray.selectSingleNode("/dfs:myFields/dfs:dataFields/dsf:Version[@Component='" + componentField + "']");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Any help would be greatly appreciated.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Ryan</description></item></channel></rss>