How to select a substring from a text field - InfoPath Dev
in

InfoPath Dev

Having trouble finding a blog or post that answers your question? Check out our Custom Search Page

How to select a substring from a text field

Last post 11-14-2017 07:51 AM by sclark55. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-14-2017 04:38 AM

    How to select a substring from a text field

    I am new to InfoPath so if did not ask the question correctly I apologize. I have text text field that has the following text in it "i:o#.w|nsna\jdoe". I believe this field has the user name in it, domain\username. I want to take the user name of jdoe and put it in another text field. I have setup a rule that has a condition "txtField contains "nsna\", a rule type of Action set a field's value txtField2 = concat(substring-before(txtField,"nsna\"), substring-after(txtField, "nsna\")) but it does work. Can anyone help? Thanks.
  • 11-14-2017 07:22 AM In reply to

    Re: How to select a substring from a text field

    You just want the username portion of the string? jdoe? That would be substring-after(txtField, "\") because you only have one "\" in the string.....
    Hilary Stoupa

  • 11-14-2017 07:51 AM In reply to

    Re: How to select a substring from a text field

    that got it. thanks.
Page 1 of 1 (3 items)
Copyright © 2003-2017 Qdabra Software. All rights reserved.
View our Terms of Use.