Result of a query - InfoPath Dev Sign in | Join | Help in Code InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » Code » Result of a query Result of a query Last post 10-05-2006 01:14 AM by Raoul. 4 replies. Page 1 of 1 (5 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 10-03-2006 05:27 AM Raoul Joined on 05-05-2006 Posts 32 Result of a query Reply Contact Hi all,I have a button query that search for a code into an access db. I need to know if this query return some records or not. If return one or more records I should change view, if no records return I should display a message. Can you help me?Thanks in advance.Raoul 10-03-2006 09:17 AM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Result of a query Mark as Not AnswerMark as Answer... Reply Contact This shouldn't be too hard. What language are you using? Below is some psuedo-code for achieving this:IssueQuery();NodeList = SecondaryDom.selectNodes( "/my:xpath/my:toNodes" );if( NodeList.length > 0 ) ChangeView();else DisplayMessage();I hope this helps, if you provide the language that you are using I will be able to provide a more tailored code snippet. Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 10-04-2006 12:35 AM In reply to Raoul Joined on 05-05-2006 Posts 32 Re: Result of a query Mark as Not AnswerMark as Answer... Reply Contact Hi Matt,thank you for help. Language of code is js, but actually button query start a "query action" with secondary connection , not a "coded query" into onclick event.I'm waiting for your reply.Thank you. Raoul 10-04-2006 11:03 AM In reply to Matt Faus Joined on 08-18-2006 Dallas, Texas Posts 1,558 Re: Result of a query Mark as Not AnswerMark as Answer... Reply Contact Oh, ok. You should be able to translate the code above into three rules.Rule 1: no condition, fire query to secondary domRule 2: if rows on secondary dom > 0, change viewRule 3: if rows on secondary dom = 0, display message Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge 10-05-2006 01:14 AM In reply to Raoul Joined on 05-05-2006 Posts 32 Re: Result of a query Mark as Not AnswerMark as Answer... Reply Contact Hi Matt,thank you for your hint. My problem now is that I don't know what kind of expression I should use to test rows in the rule condition. Can you help me?Thank you. Raoul Page 1 of 1 (5 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.