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

I have attached the below script as an OnObjectTrigger to a field for storing email addresses. The logic works correctly. However, when exiting the field to go to another, even then it exits true, the active field will not change to the next one I tried to put focus on. The field does not have validation on it at the define database level. Any ideas?

If [ Let([content = Get ( ActiveFieldContents )]; If(IsEmpty ( content ) or IsValidEmailFormat ( content ) ; 1 ; 0)) ]
	Exit Script [Result: "True"]
Else
	Show Custom Dialog ["Invalid Email" ; "You have entered an invalid email. Fix it, or remove it."]
	Exit Script [Result: "False"]
End If

OnObject what? Enter, keystroke, modify, validate, save or exit?

Your title mentions '…OnObjectValidate …" (though that it not a script step), but then you say that there is no validation at the field level. If no validation is set, then OnValidate won't fire.

 

Using this (briefer) script with OnObjectExit works for me – the focus either remains in the field, or it goes to the next field as per Tab Order.

If [ Let ( content = Get ( ActiveFieldContents ) ; not ( IsEmpty ( content ) or IsValidEmailFormat ( content ) ) ) ]
  Show Custom Dialog [ Title: title; Message: message ] 
  Exit Script [ Result: False ]
End If

 If no validation is set, then OnValidate won't fire.

 

Huh?

when exiting the field to go to another, even then it exits true, the active field will not change to the next one I tried to put focus on.

 

I cannot reproduce your issue. Are you sure there isn't something else at play here?

 

 

---

Hold on, I got it:

 

Exit Script [Result: "True"]

 

This needs to be:

Exit Script [Result: True]

without the quotes. Actually, you don't need this part at all. The important part is where you exit with a False result - which also should be without quotes, or just use 0.

Huh?

 

I don't see OnObjectValidate firing unless a validation rule is defined in the Require section.

Wow, that's not my experience.  OnObjectVaidate does require that something change in the field to fire - just entering and exiting the field won't fire it but otherwise it fires for me (Maverick also). :-)

Wow, that's not my experience.  OnObjectVaidate does require that something change in the field to fire - just entering and exiting the field won't fire it but otherwise it fires for me (Maverick also). :-)

 

I overlooked the requirement of the content change ; thanks for clarifying that.

  • Author

OnObject what? Enter, keystroke, modify, validate, save or exit?

Sorry about that... ughhh kind of a big difference  :idot:

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.