Skip to main content
Solved

Create concatenate field based on condition (if a certain field is filled or not)

  • June 9, 2023
  • 2 replies
  • 26 views

Forum|alt.badge.img+7

I have a table created like the one on the picture and would like to create a concatenate field with the name of the columns that have stars associated with. Is it possible?

For the first record the formula should return (M&A, IPO, Turn Around, Financiamento/Captação), for the third record the formula should return (IPO, Planejamento Estratégico)

 

Best answer by Stephen_Orr1

Hi @tsallis

Give this a try

 

REGEX_REPLACE( IF({M&A}, 'M&A, ','') & IF({IPO}, 'IPO, ','') & IF({Turn Around}, 'Turn Around, ','') & IF({Planejamento Estratégico}, 'Planejamento Estratégico, ','') & IF({Financiamento / Captação}, 'Financiamento/Captação, ','') , '[, ]*$', '' )

 

-Stephen

 

2 replies

Forum|alt.badge.img+18
  • Inspiring
  • 272 replies
  • Answer
  • June 9, 2023

Hi @tsallis

Give this a try

 

REGEX_REPLACE( IF({M&A}, 'M&A, ','') & IF({IPO}, 'IPO, ','') & IF({Turn Around}, 'Turn Around, ','') & IF({Planejamento Estratégico}, 'Planejamento Estratégico, ','') & IF({Financiamento / Captação}, 'Financiamento/Captação, ','') , '[, ]*$', '' )

 

-Stephen

 


Forum|alt.badge.img+7
  • Author
  • Inspiring
  • 13 replies
  • June 12, 2023

Hi @tsallis

Give this a try

 

REGEX_REPLACE( IF({M&A}, 'M&A, ','') & IF({IPO}, 'IPO, ','') & IF({Turn Around}, 'Turn Around, ','') & IF({Planejamento Estratégico}, 'Planejamento Estratégico, ','') & IF({Financiamento / Captação}, 'Financiamento/Captação, ','') , '[, ]*$', '' )

 

-Stephen

 


I really have to learn more about REGEX it is really usefull. Thanks for the tip Stephen