URGENT Help Required! Retrieve data from an XML file - InfoPath Dev
in

InfoPath Dev

URGENT Help Required! Retrieve data from an XML file

Last post 12-03-2009 08:54 AM by smods. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 11-30-2009 05:48 AM

    • smods
    • Not Ranked
    • Joined on 08-06-2008
    • Posts 25

    URGENT Help Required! Retrieve data from an XML file

    Hi all,

    I have a data connection to retrieve data from an XML file.  My users type in their LAN id into a field and it looks at their LAN id and returns their name and contact details.  What I need to know is what is the best option for when no match is found? 

    Regards

    Chris

  • 11-30-2009 05:53 AM In reply to

    Re: URGENT Help Required! Retrieve data from an XML file

    Ummmm... how about displaying "no match found" using conditional formatting or red guidance text?

    Patrick Halstead
    Project Manager at Qdabra
  • 11-30-2009 07:04 AM In reply to

    • smods
    • Not Ranked
    • Joined on 08-06-2008
    • Posts 25

    Re: URGENT Help Required! Retrieve data from an XML file

    Displaying no match found would be ideal.

    How would I do this?

  • 11-30-2009 07:10 AM In reply to

    Re: URGENT Help Required! Retrieve data from an XML file

    You are querying an XML list. There are two possible outcomes:

    1. A record is found. So you create a rule to display the data retrieved.

    2. A record is not found. So you create a rule to display a dialog box or an expression box with a message.

    Here's a link that might prove useful: http://www.bizsupportonline.net/blog/2009/08/infopath-rules-conditions/

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 12-01-2009 12:10 AM In reply to

    • smods
    • Not Ranked
    • Joined on 08-06-2008
    • Posts 25

    Re: URGENT Help Required! Retrieve data from an XML file

    I'm unsure as to what rules I would use for this?

    At the moment the default value of the text box is "@AGName[@AGLan = AGLANID]"

    Any help you can offer with the rules would be appreciated

  • 12-03-2009 03:55 AM In reply to

    • smods
    • Not Ranked
    • Joined on 08-06-2008
    • Posts 25

    Re: URGENT Help Required! Retrieve data from an XML file

    Can anyone help with what I need to do?

    Thanks

  • 12-03-2009 05:49 AM In reply to

    Re: URGENT Help Required! Retrieve data from an XML file

    Hi Smods,

    I have no idea what you are talking about. Please take a deep breath and explain in detail what you would like your form to do and what it is currently doing.

    Thank you!

    Patrick Halstead
    Project Manager at Qdabra
  • 12-03-2009 07:35 AM In reply to

    • smods
    • Not Ranked
    • Joined on 08-06-2008
    • Posts 25

    Re: URGENT Help Required! Retrieve data from an XML file

    Thanks for replying Patrick.

    Basically I have an infopath form with a receive data connection that receives data from an XML file.

    I have a text box where the user types in their LAN ID and if a match is found it displays their name and contact e-mail address in two other fields (information from the XML file).  However when a user types in a value that isn't found in the XML list then nothing is returned in the other two fields. 

    I need to understand the best way to get the get the name and e-mail fields to display "No Match Found" when the user enters a value not found in the XML list.

    Thanks, if you need any further information then please let me know

    smods!

  • 12-03-2009 08:38 AM In reply to

    Re: URGENT Help Required! Retrieve data from an XML file

    Hi -- Hide the fields if they are blank and the LAN ID field is populated. Add expression boxes that say 'No Match Found' that display when the fields are blank and the LAN ID field is populated.

    Hilary Stoupa

  • 12-03-2009 08:39 AM In reply to

    Re: URGENT Help Required! Retrieve data from an XML file

    I imagine that you already have a rule that sets a field's value based on the data retrieved.

    If so, then you just need a second rule, in case a match is not found. When that happens, insted of setting the fields equal to the value retrived, you'll set it equal to "no match found".

    RULE 1: Set a field's value to the value retrieved from the xml
    Condition: there is a match in the xml file

    RULE 2: Set a field's value to "No match found"
    Condition: there is no match in the xml file

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 12-03-2009 08:54 AM In reply to

    • smods
    • Not Ranked
    • Joined on 08-06-2008
    • Posts 25

    Re: URGENT Help Required! Retrieve data from an XML file

    ErnestoM:

    I imagine that you already have a rule that sets a field's value based on the data retrieved.

    If so, then you just need a second rule, in case a match is not found. When that happens, insted of setting the fields equal to the value retrived, you'll set it equal to "no match found".

    RULE 1: Set a field's value to the value retrieved from the xml
    Condition: there is a match in the xml file

    RULE 2: Set a field's value to "No match found"
    Condition: there is no match in the xml file

    Hi Ernesto,

    At the moment I have the default value in the two data fields (e-mail and name) as:

    @AGName[@AGLan = AGLANID]

    &

    @AGMail[@AGLan = AGLANID]

     So from the @AGName & @AGMail are retreived from the secondary data source (the XML file) where @AGLan (Text box in primary data source) matches AGLANID from the secondary data source (the XML file). 

    Where you say "Condition: there is a match in the xml file" - What is the criteria you set in the rule as I cannot figure out how to do this.

    Many thanks for your help!

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