Padding values in a text box - InfoPath Dev
in

InfoPath Dev

Padding values in a text box

Last post 11-21-2007 06:30 AM by Clay Fox. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 11-21-2007 03:25 AM

    Padding values in a text box

    xdXDocument:GetDOM("RELM_LOOKUP")/dfs:myFields/dfs:dataFields/d:RELM_LOOKUP/@RELM_NME[concat(txt_RelmNumber, " ") = @RELM_ID]

    Clay, I set a condition that looks for the field entered does not equal the pattern (5 characters) this should catch anything that is not 5 characters. Then I've included the filter in the above XPATH code snippet.   RELM_LOOKUP is the secondary  data connection, @RELM_NME is the value from the query that I want (Account Name) txt_RelmNumber is what they enter in the text box and @RELM_ID is the compare value from the secondary data connection. I cant get it to work for any value entered that is 3 or 4 characters in length.

     

    Again, if I have an account name like "ABI" and I add 2 spaces at the end when I enter it into the text box, the lookup works perfectly....when i dont enter the spaces, I don't get any value.

  • 11-21-2007 06:30 AM In reply to

    Re: Padding values in a text box

    Alright Ed, we got get through this eventually right? :)

    Have you tried doing this without code and just through the rules setup? I think what I described last should work for you.  The code above adds one space to your entry but would not work for shorter entries.  You would either need logic for each of the 4 scenarios and copy that or get the normalize-space to work.

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