Jump to content
  • 0

Remove string value from text string in formula




Does anyone know, in a formula field in a table, how to remove the value of a text field from another text field? There are 3 fields involved: 

Field1: text255 that contains comma delimited values. 

Field2: text255 that contains a value that may or may not be included in Field1 string value

Field3: formula: removes field2 value  from field1 if that value is in field1 (and does nothing if not). 

For example: 

Field 1 (text255) = 524_789B, 524_788B, 524_794B, 524_791B, 524_1047B

Field 2 (text255)  = 524_794B,

Field 3 (formula) = 524_789B, 524_788B, 524_791B, 524_1047B

What would be the formula for Filed 3 to do this? Many thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I figured out a sort of workaround. The 'Replace' clause will remove a string and replace it with something else. In case anyone needs something like this: 

Field3 formula = Replace([@field:field1],[@field:field2],'')

The only issue is this leaves an extra space where field2 used to be but it works ok otherwise. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...