We help IT Professionals succeed at work.

How do I check for length of a field in InfoPath with respect to padding?

zintech
zintech asked
on
In my database here at work, the columns I am attempting to check in InfoPath are padded in the database to the maximum length of the field, which is 30 characters.  Any entry under 30 characters in the field will be padded with enough spaces to have the field length equal 30.  My question is how would I go about adding these extra spaces when checking for equality in InfoPath?  I am checking the entry in a textfield that the user enters in InfoPath against the entry in the database, therefore the entry that the user enters into the textfield in InfoPath needs to be 30 characters long, with spaces filling in any field length shorter than 30 characters.  I have already tried using the trim(), Rtrim() and Ltrim() functions when bringing the data in from tbhe data source, but this does not work.
Comment
Watch Question

Director of Business Integration
Commented:
You can use the functions normailize-space or the substring command to exclude any spaces on both the queried data and the data in your form to make sure you are comparing apples to apples.