Skip to main content

Hello All, 

 

I have a multi line string text variable. It is a sentence that list set items. EX:  colors included are: red, magenta, yellow, orange, blue.

 

I have a workflow that counts one list items and updates another with the count. 

 

List A:

#1 color = blue

#2 color = blue

#3 color = yellow

 

The workflow will count all of the items with that color and update a template 

 

Blue = 2

yellow = 1

red = 0

magenta = 0

orange = 0

 

I am trying to figure out how to remove "red," "maganta", "orange",  from the text variable that gets e-mailed to a user so that the sentence reads: colors included are:  yellow, blue.

 

any help would be appreciated. 

You can use the "Regular Expression" action in your workflow in conjunction with other actions to remove the matching colors in the multi-line string variable.

First add a "Run If" action for each of colors (5 total) and configure that action to run if that individual color count equals 0.

Then add a "Regular Expression" action inside the "Run If" action and configure the "Regular Expression" action with Pattern for the color (for example, "red, "). Don't include the quotation marks and do make sure to include the comma and space.  Keep Replacement Text as empty, insert the multi-line text variable in the Input Text, and select the same multi-line text variable as the Store Result In option.  The "Regular Expression" action should look like the image below.

You'll have to configure five Run If actions that include a Regular Expression action for each. This should dynamically remove the color names from the multi-line text variable and end up with your requested result.



 




Thank you @bamaeric 


 




@Nates_Mom wrote:


Hello All, 



 



I have a multi line string text variable. It is a sentence that list set items. EX:  colors included are: red, magenta, yellow, orange, blue.



 



I have a workflow that counts one list items and updates another with the count. 



 



List A:



#1 color = blue



#2 color = blue



#3 color = yellow



 



The workflow will count all of the items with that color and update a template 



 



Blue = 2



yellow = 1



red = 0



magenta = 0



orange = 0



 



I am trying to figure out how to remove "red," "maganta", "orange",  from the text variable that gets e-mailed to a user so that the sentence reads: colors included are:  yellow, blue unicorn coloring pages



 



any help would be appreciated. 






i will follow up and look forward to



@Nates_Mom wrote:


Hello All, 



 



I have a multi line string text variable. It is a sentence that list set items. EX:  colors included are: red, magenta, yellow, orange, blue. resize image 



I have a workflow that counts one list items and updates another with the count. 



 



List A:



#1 color = blue



#2 color = blue



#3 color = yellow



 



The workflow will count all of the items with that color and update a template 



 



Blue = 2



yellow = 1



red = 0



magenta = 0



orange = 0



 



I am trying to figure out how to remove "red," "maganta", "orange",  from the text variable that gets e-mailed to a user so that the sentence reads: colors included are:  yellow, blue.



 



any help would be appreciated. 






ohh, this is really impressive, thank you!


Reply