Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 1488 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I'm using text in my delivery slip layout through a lookup field and want to remove text if "RO#" text is in the field

example: VS-321 The Severed Arm: Blu-Ray RO# 52975

i want to remove everything starting with "RO#" if the field contains it,

I know this can be done using LeftWords or RightWords but I can't get it done,

if anyone can help it would be much appreciated.

Thanks.

Pio

Posted

Thank you, that works perfect when I use my data viewer to test it,

but how would I use it in my field if I already have a looked-up value selected

sorry I don't know how to do both I can either select calculation or looked-up in my options for field.

Posted

You can incorporate a lookup in a calculation using the Lookup() function - say: 

Let ( [
text = Lookup ( Sourcetable::Sourcefield ) ;
pos = Position ( text ; " RO#" ; 1 ; 1 ) 
] ;
If ( pos ; Left ( text ; pos - 1 ) ; text )
)

This is assuming you need to have an independent copy of the looked up data, a copy that will not change if the lookup source field is modified. Otherwise you could simply use an unstored calculation field = 

Let ( [
pos = Position ( Sourcetable::Sourcefield ; " RO#" ; 1 ; 1 ) 
] ;
If ( pos ; Left ( Sourcetable::Sourcefield ; pos - 1 ) ; Sourcetable::Sourcefield )
)

 

Posted

Hi, 

What if I wanted to remove the"C" or any letter from my field

example of a field with a PO#: CG350C53

is there a way to remove the "C"s

thanks.

Pio

This topic is 1488 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.