Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Der_Unbekante_234
Contributor II
Contributor II

filename() change and make the name shorter

Hello together,

My problem: I want to take just a part of the filename and want to do a little change on it.

For example:

The filename is: PR_E1440_G_FJH.cs

But I need only the part E1440

The little change should be a (.) point after the E. So what I want is to make is/get  E.1440

 

I tried this function:

subfield (RIGHT(LEFT(FileName(), 8), 5), 'E ', 1)&'.'& subfield (RIGHT(LEFT(FileName(), 8), 5), 'E', 2)

 

but the outcome is .1440 --> So the E is missing at the beginning.

 

Can someone help me? I would be very glad for any help.

 

BR

Labels (6)
1 Solution

Accepted Solutions
Vegar
MVP
MVP

Try something like this.

mid(Subfield(FileBaseName(),'_',2),1,1) &'.'& mid(Subfield(FileBaseName(),'_',2),2)

View solution in original post

3 Replies
Vegar
MVP
MVP

Try something like this.

mid(Subfield(FileBaseName(),'_',2),1,1) &'.'& mid(Subfield(FileBaseName(),'_',2),2)

Der_Unbekante_234
Contributor II
Contributor II
Author

Thanks it works.