Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Way to Inject Another Field into String inside delimiters without messing with the spaces

Carlos_Tovar
7 - Meteor

Hello,

 

I am currently working on editing a workflow in xml format within another workflow and I need to Inject a string value within another string value in a certain spot...In this case from  [target value] between >< in [Field_1].

 

I did it successfully with text to columns by splitting it then using a formula to combine everything but that did not keep my Field_1 integrity and took away my whitespaces.

 

I need to keep the trailing spaces and everything exactly the same but just changing the value between ><... is there a regex formula of some sort I can use or another formula that wont mess with the spaces and just inject it directly ?

 

ThanksXML Editing ex.png 

3 REPLIES 3
CarliE
Alteryx Alumni (Retired)

@Carlos_Tovar 

 

You can use a formula tool to replace the digit or digit dash digit  -- REGEX_Replace([Field1], "\d+\-\d+|\d+", [target])

 

The regex statement is saying find digits-digits OR Digits

 

Into the formula

CarliE_0-1667940588382.png

 

 

Output of the formula 

CarliE_1-1667940615446.png

 

 

If this solved your issue, please be sure to mark it as a solution so other users can benefit! :)

Carli
braveraj
10 - Fireball

I may not exactly understand your question but you can use a regex parse tool to parse out the target value, then use the find and replace to replace value with your desired insert.

 

braveraj_1-1667942748501.png

braveraj_2-1667942813182.pngbraveraj_3-1667942832928.png

 

 

 

 

Carlos_Tovar
7 - Meteor

Awesome this worked thanks

Labels