Result of a query - InfoPath Dev
in

InfoPath Dev

Result of a query

Last post 10-05-2006 01:14 AM by Raoul. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-03-2006 05:27 AM

    • Raoul
    • Top 500 Contributor
    • Joined on 05-05-2006
    • Posts 32

    Result of a query

    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

    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 MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 10-04-2006 12:35 AM In reply to

    • Raoul
    • Top 500 Contributor
    • Joined on 05-05-2006
    • Posts 32
    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

    Oh, ok. You should be able to translate the code above into three rules.

    Rule 1: no condition, fire query to secondary dom
    Rule 2: if rows on secondary dom > 0, change view
    Rule 3: if rows on secondary dom = 0, display message
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 10-05-2006 01:14 AM In reply to

    • Raoul
    • Top 500 Contributor
    • Joined on 05-05-2006
    • Posts 32
    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.