Help

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

Solved
Jump to Solution
979 0
cancel
Showing results for 
Search instead for 
Did you mean: 
tsallis
6 - Interface Innovator
6 - Interface Innovator

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)

Captura de Tela 2023-06-09 às 15.23.07.png

 

1 Solution

Accepted Solutions
Stephen_Orr1
10 - Mercury
10 - Mercury

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

 

See Solution in Thread

2 Replies 2
Stephen_Orr1
10 - Mercury
10 - Mercury

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