Questions about "@" and functions in InfoPath - InfoPath Dev
in

InfoPath Dev

Questions about "@" and functions in InfoPath

Last post 07-06-2009 06:50 AM by Francis. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-06-2009 05:08 AM

    • Francis
    • Not Ranked
      Male
    • Joined on 07-06-2009
    • Washington, DC
    • Posts 14

    Questions about "@" and functions in InfoPath

    I'm a SQL Server database developer who's migrating an Access database to SQL Server 2005.  I'm using InfoPath 2007 to replace the Access forms (I'm a novice in InfoPath). 

    I'm using a SQL Server endpoint as the web service and only want to use stored procedures for querying and submitting.  Since I'm not a programmer, I'm trying to avoid coding.

     However, in using rules and filtering I have 2 questions that aren't really explained in any reference books or articles that I've looked at:

    1. What does "@" mean, e.g., when using it in a filter or formula?  To me it means a SQL Server input/ouput parameter or a variable.  How do I know when and how to use it? 

    2.  Are there any good references on the definition and the use of InfoPath functions?  I've only found one Microsoft reference, but would like to find others:

    http://office.microsoft.com/en-us/infopath/HA012330391033.aspx

    Thank you for the help.

  • 07-06-2009 06:06 AM In reply to

    Re: Questions about "@" and functions in InfoPath

    I'm only guessing where you saw this, but I imagine it is an XPath expression. It has nothing to do with SQL Server input/output parameters. InfoPath uses XPath to refer to elements and attributes in the XML structure of your form. The XPath for referring to an attribute precedes the attribute name with an @ symbol. For example, take the following XML:

     <book title="War and Peace">

    <chapter>Chapter 1</chapter>

    <chapter>Chapter 2</chapter>

     </book>

    If you wanted to get the title of the book in an InfoPath formula, you would refer to it as @title (since it's an attribute of book you use the @ symbol). If you wanted to refer to an element in an InfoPath formula (like book or chapter) you would just refer to it as book or book/chapter (no need for the @ since these are elements).

    InfoPath takes care of building the XPath for you when you build your epressions, there's usually no need for you to do this yourself unless you need a really complex XPath query.

  • 07-06-2009 06:50 AM In reply to

    • Francis
    • Not Ranked
      Male
    • Joined on 07-06-2009
    • Washington, DC
    • Posts 14

    Re: Questions about "@" and functions in InfoPath

    Thank you pdjohnson_2000; that does help explain it.  I saw this in an example in a beginning InfoPath 2003 book on creating rules and also on using formulas in an expression box.

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