Customize Text Box Field - InfoPath Dev
in

InfoPath Dev

Customize Text Box Field

Last post 08-24-2017 07:59 AM by Hilary Stoupa. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-23-2017 02:35 PM

    Customize Text Box Field

    Hi I'm trying to create a rule by comparing one field to another. I have a drop down that's pulling from a SharePoint list. From there I'm taking that name and putting it in a text box. Conversely I have another text field that is using the userName function to pull the logged in user's name into it. I also had to use the substring-after(userName(), "i:0#.w|") function to get rid of all of that junk before the username. I should also say at Form Load I'm using the Translate function to also make both fields capital letters to make them match as not all of the names in our AD have proper caps. So now I have in the second field exactly AD\FIRST.LAST which is fine but in the first field I just have FIRST LAST which isn't exactly the same. My question is in that text box that's pulling from the dropdown how can I add AD\before the name and a period between the First and Last name? Or have some way to trim AD\ and the period from the second field? That might be easier. Many thanks in advance
  • 08-23-2017 04:58 PM In reply to

    Re: Customize Text Box Field

    You could use the translate function to replace the period with a space (if you have a space between FIRST LAST above). You can use substring-after to get rid of AD\ - substring-after(field, "AD\")
    Hilary Stoupa

  • 08-23-2017 06:48 PM In reply to

    Re: Customize Text Box Field

    Thank you so much for the response Hilary. So I've cleaned up the AD and now I have First.Last but having trouble with the translate function. Does this look correct translate(., ".", " ") Also FYI I'm using the translate function to make it all caps that works and it looks like this translate(., "abcdefghijklmnopqrstuvwyxz", "ABCDEFGHIJKLMNOPQRSTUVWYXZ") any thoughts? Again thank you so much
  • 08-23-2017 08:26 PM In reply to

    Re: Customize Text Box Field

    Success!! Please disregard my last message I got it to work. As always thank you Hilary and to this fantastic site you guys are lifesavers.
  • 08-24-2017 07:59 AM In reply to

    Re: Customize Text Box Field

    Awesome, glad you have it working. :)
    Hilary Stoupa

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