Infopath rules - InfoPath Dev
in

InfoPath Dev

Infopath rules

Last post 12-18-2012 08:02 AM by eissayouf. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-07-2012 03:21 PM

    Infopath rules

    I would like to see if a database field contains some string value then show one filed and if not show another field. I tried to do this in the rules by using "Contains" function in the form load rules, but it appears that I don't know the syntax of the rule writing very well, so can somebody show me the syntax, if it is possible to do so. Somethign like this, but with correct syntax:

    LoggedInAccount = (userName(), substring-after(userName(), "\")  contains(userName(), "\")

  • 12-17-2012 09:51 PM In reply to

    Using an XPath expression to select between two or more values can usually get a bit messy.  In this case, this should work:

    substring(userName(), string-length(substring-before(userName(), "\")) + 2 * contains(userName(), "\"), 100)

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-18-2012 08:02 AM In reply to

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