Fill empty spaces in text field with dashes - InfoPath Dev
in

InfoPath Dev

Fill empty spaces in text field with dashes

Last post 06-30-2010 10:31 AM by mpeters. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-30-2010 07:53 AM

    Fill empty spaces in text field with dashes

    I have a requirement to have a six digit field's unused available spaces filled with dashes.

    example1:  wheel-

    examle 2:  car---

    If six characters are entered, then nothing needs to be done.  I was trying to figure a way to do this by using string-length, then set the fields value by concatinating dashes onto the field's value,but I haven't come up with a way yet.  Any suggestions???

  • 06-30-2010 08:25 AM In reply to

    Re: Fill empty spaces in text field with dashes

    I got it!  I am just going to concat a string of dashes onto the field value and take a substring of that.

  • 06-30-2010 09:22 AM In reply to

    Re: Fill empty spaces in text field with dashes

    Smart solution! So, you'll concat the field with a string of 6 dashes, then use substring to return the first 6 characters.... Thanks for posting your answer, in case someone else comes looking for something like this.

    Hilary Stoupa

  • 06-30-2010 10:31 AM In reply to

    Re: Fill empty spaces in text field with dashes

    Yep!  The reason for the dashes is that this field is concat'd with additional fields to form an ID, which needs to always be a certain length.

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