Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi all,

wondering if anyone could help me out, i have moved from access to filemaker, i can do a bit of vba in access and excel but new to filemaker scripts can someone help me out i want to shorten the text depending on the length can someone help convert the below into filemaker language

IIF[LotLengh]=17,Left([LotNumber],Len([LotNumber])-9),IIF[LotLengh]=18,Left([LotNumber],Len([LotNumber])-11)

how would you write this in filemaker specify calculation,

many thanks

Posted

I think it translates to =

Let (

len = Length ( LotNumber )

;

Case (

len = 17 ; Left ( LotNumber ; 8 ) ;

len = 18 ; Left ( LotNumber ; 7 )

)

)

Hard to be sure, because it doesn't make much sense. What exactly are you trying to do here?

Posted

Hi Thanks for your reply the goal is to trim the text by the length of the string , so if LotNumber is 12345678912345678 (17 charaters) then cut off the first 8 charaters so it would read 912345678

is this the best way to achieve it

many thanks

Posted

I don't think that's what your code does. If you want at most 9 characters counting from the right, then =

Right ( LotNumber ; 9 )

will do it without all the fuss (and the same is true in Excel and I presume in VBA as well).

Posted

Ha Ha i was just trying it out and noticed my mistake :idot: , your let solution works perfectly many thanks i changed the Left to right, the lot number field will always change lenghts so thats the need for the string

once again many thanks for your advise and taking the time to help me out

This topic is 4472 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.