Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

help convert VBA to filemaker script

Featured Replies

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

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?

  • Author

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

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).

  • Author

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.