The Replace Function

Home Forum Behaviors The Replace Function

This topic contains 2 replies, has 0 voices, and was last updated by  jschultz 7 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #674

    jschultz
    Participant

    Has anyone used the Replace function?

    I would like to have the Replace function correct certain elements of a field.

    for example, if the user enters Road or Street instead of RD or ST the form to change it to the latter.

    I am testing out a form with one field and a button that calls the replace function. What I have (see below) doesn’t work. Any ideas?

    Replace{

    Text:

    field1

    Patter:

    “Road”

    Replace text:

    “RD”

    Flags:

    “i”

    }

    #5569

    jschultz
    Participant

    Well actually it works but it adds RD to “road” once I corrected the fields. I do not know what to put in for pattern.

    Replace{

    Text:

    “Road”

    Pattern:

    <empty>

    Replace text:

    “RD”

    Flags:

    “i”

    }

    #5574

    Assuming that ‘field1’ is the text field that includes the embedded Road text string, this looks OK to replace only the first occurrence. If there might there be more than one occurrence of the word, include “g” in your flags.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.