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.