Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!

Alteryx Designer Desktop Discussions

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

Add columns between text

tjamal1
Asteroide

I wanted to add a columns between quotations in my json file in recordID 3

 

for example this should be replaced 

"staticContent": "  "

 

with 

"staticContent": " column2  "

 

7 RESPUESTAS 7
atulggrwl2
Meteoro

I don't have Alteyx in my System Can you please share jpeg image for better reference

tjamal1
Asteroide

clipboard_image_0.png

atulggrwl2
Meteoro

If field1 equals Blank(StaticContent) then New Column Name

tjamal1
Asteroide

Blank function is not working 
Can you suggest me the proper formula?

atulggrwl2
Meteoro

may be its isBlank as, i don't have access to Alteryx so i don't know how to structured formula properly

tjamal1
Asteroide

clipboard_image_0.png

like this?

danilang
19 - Altair
19 - Altair

Hi @tjamal1 

 

Try this Regex based solution

 

Formula.png

 

 

REGEX_Replace([Field_1], '(.*?: ")( )(")', '$1 '+[Daysoftheweek]+ ' $3')  

 

The search strings breaks down to this 

(.*?: ") 1st capture group.  All characters up to the ': "' 

( )        2nd capture group.  The single space between the 2 double quotes

(")       3rd capture group.  The final double quote

 

The replace string is 

'$1 '+  the 1st capture group from above

[Daysoftheweek]+  the contents of the column [DaysoftheWeek].  change this to whatever you need

' $3'    The 3rd capture group 

 

The end result of this is that the 2nd capture group(the single space between the double quotes) is replaced by the contents of the [DaysoftheWeek] column.   

 

The results for your dataset are 

results.png

 

Dan

Etiquetas
Autores con mayor cantidad de soluciones