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

Featured Replies

Hi All,

Please could someone help or advise me, i am building a database where i will be scanning barcodes into a table each product has two barcodes a product and a lot, all the products begin either 01 or A1 and lots always begin 17 or B2

In access i could validate with an after update event to check the information in the field began with 01 or a1 but how would i go about in file maker 12, just started to use it and have only attended a one day course which this wanst covered

could someone please help me out?, i have been looking at this for ages and im sure it must be somthing i could use with the onobjectvalidate but yet again could be completely wrong?

many thanks

Use a formula like:

Let( entry = Left( barcode ; 2 ) ;

  entry = "01" or entry = "A1" )

  • Author

Use a formula like:

Let( entry = Left( barcode ; 2 ) ;

entry = "01" or entry = "A1" )

Hi Fitch,

thanks for your reply, is the to be placed in the validation by calculation, as i need it to check on exit of the field and not at when a new record is been created, i tried to put it in the onobjectvalidate but it doesn't have the Let function

Also sorry never used LET my field Product do that relate you entry or barcode in your formula

I managed to pull out the vba which i used in access, could anyone help me recrate this in script

If Left([barcode], 2) = "+H" Or Left([barcode], 2) = "+M" Then Exit Sub

Beep

Cancel = True

Me.Barcode.Undo

End Sub

OnObjectValidate doesn't have any functions. It's a script trigger. You assign the trigger to the field to tell it when to trigger, and what script to run when triggered.

Use the formula I supplied in the script, using the "If" script step. It's not critical to use the Let function, it just makes the calc a little more efficient.

The script would look something like this:

If [ Left( Barcode ; 2 ) = "+H" or Left( Barcode ; 2 ) = "+M" ]

  Exit Script

Else

  Beep

  Exit Script [ Result:0 ]

End If

When you exit with a result of 0 (or "false") it stops the user's action that invoked the trigger, e.g. it keeps you from tabbing out of the field.

  • Author

mate all i can save is "WOW" you have really helped my out big time i cannot thank you enough for this i have looked at me screen now for about 24 hrs at the same script !!!!!

once again many thanks and thanks for your patience and understanding

:yep: :yep: :yep: :yep: :yep: :laugh2:

Create an account or sign in to comment

Important Information

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

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.