Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Create New Field Using Existing Field

Hi,

I have a field 'Source' which has values - A, B, C, D, E.

I want to create a new field using this 'Source 1' that should have all the values except A.

How can I create this new field?

10 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Load

....

if(Source<>'A', Source, 'To be defined') as Source

...

Let me know

simenkg
Specialist
Specialist

if(Source=A,null(),Source) as Source 1

puttemans
Specialist
Specialist

Hi,

Think it should rather be

if(Source<>'A', Source,'-') as Source_1

As you do not want to replace the Source variable, but create a new one.

Not applicable
Author

if(Source<>'A',Source)

alexandros17
Partner - Champion III
Partner - Champion III

I have written 'To be defined' because Rahul did not say what to do with missing values ... they could be set to Null(), blank or something else

puttemans
Specialist
Specialist

No issue there, that's indeed whatever you like. I think you may have forgotten to add the correct variable you want to write the information to. The basis is Source, but an additional variable should be created Source 1. In your formula, you tend to overwrite Source, Hence my reaction.

Anonymous
Not applicable
Author

Thank you for all your suggestions. It worked!

Regards,

Rahul

Not applicable
Author

Hai Rahul,

Could you please post the screen shot of code for creating new field from existing .

Thank you

Anonymous
Not applicable
Author

1.PNG.png