Announcements
cancel
Showing results for
Did you mean:
Contributor III

## Separate or Trim Field into 2 values

Hi There, I would like assistance on separating field or trimming it into 2 parts, so i can connect that field with the other field from other file. see examples

DEV25, DEV29,DEV45,DEV19,PRO23,PRO353,PRO43,PRO22

I need to only be able to focus on the DEV or PRO part and separate them to numbers, because the field i want to connect with has only numbers such as 25,29,45,19,23,353,43,22,

Your help will be highly appreciated.

Labels (1)
• ### General Question

4 Solutions

Accepted Solutions
MVP

Left(Field,3) and Mid(Field,4,999) should be the simplest way in this scenario.

Contributor III

You can achieve this by using IF statement

IF(Field2=Field1,'yes','no') as flag

Where Field2 is other Data Source Field.

Please note for doing this you need to connect both tables first either making both fieldname common or by using joins, then you can apply above logic.

Contributor III

you can also apply below logic

Left(Field1,3) -> It will give Dev OR Pro
Right(Field1,(Len(Field1)-3)) -> It will give numbers i.e 25,29 etc

Contributor III
Author

Thank you @Or  and @Sayed_Mannan  The solutions worked.

5 Replies
MVP

Left(Field,3) and Mid(Field,4,999) should be the simplest way in this scenario.

Contributor III
Author

Thanks so much the solution works,

now i need to create a field which returns Yes else No,

in a scenario where field1 value is 3421 and if it matches with value on other data source field return Yes if not return No.

Contributor III

You can achieve this by using IF statement

IF(Field2=Field1,'yes','no') as flag

Where Field2 is other Data Source Field.

Please note for doing this you need to connect both tables first either making both fieldname common or by using joins, then you can apply above logic.

Contributor III

you can also apply below logic

Left(Field1,3) -> It will give Dev OR Pro
Right(Field1,(Len(Field1)-3)) -> It will give numbers i.e 25,29 etc

Contributor III
Author

Thank you @Or  and @Sayed_Mannan  The solutions worked.