To those of you who might be fairly new to InfoPath, especially those who have come from the ASP.Net or SSRS world, you might notice that in the function list (for rules, control population, etc), that there is no ‘Replace’ function.

However, there is a ‘Translate’ function which does the same thing, but even better in one way. In the old VB script language, you would have something like:

Replace(MyText, TextToFind, ChangeTextTothis)

This was all well and good, but you could only change one object at a time. With the ‘Translate’ function, you can select several items at one time.
For instance:

translate(MyString, ":-T", "")

In this example, the translate function removes all the colons, all the dashes and the letter Ts from the string.