Phoenix left function and Replace function for column transformation in data wizard

Q1) On page 127 of Phoenix Winnonlin User guide 6.3, It is mentioned that

left (“This is a test”, 3) = This;

Is this a typo?

Q2) I need to create a new column for the subjectID by transforming existing column. First, I used transformation option to create a new column called NewSubjectID with the same data as subjectID. Then, I used filter option followed by Built-in Replace function. For example, I tried to replace the subject ID 5801-001 with Y-201.

I get an error Failed to execute. Reason:
Input string was not in a correct format.

Why do I get his error even when I use the built-in function?

Am I doing something wrong or, Is there a glitch in replace function?

Thanks,

Hari.

Q1, i’ll have to check the maunal for this typo but certianly the result from that statment would be ‘Thi’

Q2, can you attach the project as it’s not clear exactly what you are trying to do.
I think you may be missing a mapping
Thanks. simon

Thank you Simon, for the quick reply. Attached is the project with a dummy example. I am trying to use filter option, followed by built-in replace function.

Testproject2.phxproj (101 KB)

Hi Ananthha,
I am still unclear what it is that the filter is not liking but you can do
what you want with a custom transformation using an if statement. This is
working - see the second data wizard on the attached project.

Take a look and see if this resolves your problem.

AnaTestproject2_ah.phxproj (182 KB)

By the way the following custom transformation will also work for you:

substitute(Subjid, “8001-001”, “A1-100”, 0)

Thanks Ana. Yes. Not sure, what is it that the 'filter" is not liking!

Your alternative suggestions would work.

For a specific transformation to entire column (not just single cell), what would you suggest? I attached a project and I need to get to NewSubjID from SubjID within phoenix, even when the dataset is large.

Thank you so much.

Hari.

Testproject3.phxproj (102 KB)

Hi Hari,
There are several ways to do this. I have added one data wizard that accomplishes this up to
SubjIDs starting with 8005 but you can modify it for whatever you need. You can create one big
long formula but I prefer to split it to make sure each piece is working out.

Hope this helps,
AnaTestproject3_ah.phxproj (207 KB)