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.

Conditional Error Message

Featured Replies

Hi guys,

Need some ideas, or if it's even possible to do what I need.

I have a field where I am expecting specific values. Currently, I am using a formula to validate the entry, but the message is general for all conditions.

The conditions are: "Only Number Only", "Entry Must be 6 or 5 Characters", "No Duplicate Records Allowed.", and "Entry MUST start with 8, 6, 2 or 1"

Is there a way that I can have individual custom messages for each error?

Thanks

Rudy

28 minutes ago, rudym88 said:

Is there a way that I can have individual custom messages for each error?

Not through the validation mechanism, but you could use a script trigger to precede validation and do your own thing.

  • Author

Thanks,

I am experimenting with a script using the "IF" and triggered on exit, but haven't been able to get it to do what I need. Any ideas would be much appreciated.

Thanks

Rudy

Edited by rudym88

You should trigger the script OnObjectValidate otherwise validation will occur before the script runs (at least those elements of validation that do not wait until record commit), defeating the very purpose of this exercise.

The script itself could be something like:

Set Variable [ $errors ; ... ]
If [ not IsEmpty ( $errors ) ]
  Show Custom Dialog [ $errors]
  Exit Script [ Result: False ]
End If

with the $errors variable calculated along the lines of:

List (
If ( some test ; "some error message") ; 
If ( another test ; "another error message") ;
...
)

(Untested)

Edited by comment

11 hours ago, rudym88 said:

The conditions are: "Only Number Only", "Entry Must be 6 or 5 Characters", "No Duplicate Records Allowed.", and "Entry MUST start with 8, 6, 2 or 1"

BTW, I am intrigued what kind of data requires these particular restrictions.

7 hours ago, comment said:

BTW, I am intrigued what kind of data requires these particular restrictions.

Comment, I ask myself the same questions. This is a database I created to track the time orders take from when they are received at the warehouse to when the truck returns to the warehouse.

The data clerks who create the records are making enormous mistakes, e.g., creating duplicate entries by adding digits to the number or changing the order of the digits.

I wanted to auto-create the record by pulling data from the ERP, but I can't because FM ODBC isn't compatible with the ERP database.

57 minutes ago, JMart said:

The data clerks who create the records are making enormous mistakes, e.g., creating duplicate entries by adding digits to the number or changing the order of the digits.

Such mistakes can usually be prevented by adding a check digit to the value, if you can arrange such thing with your data provider.

1 hour ago, JMart said:

FM ODBC isn't compatible with the ERP database.

Have you tried connecting via an API instead (assuming they do provide such thing)?

  • Author

Thanks,

I can try with the consultant the "check digit", as per the API I checked with the consultant, Sage does not offer an API. The only way is the read-only ODBC they offer.

Thanks

Rudy

18 minutes ago, rudym88 said:

Sage does not offer an API.

AFAIK (which is very little to nothing) a REST API is possible through third-party middleware.

About ODBC, I wonder if you are approaching it the right way. I have seen a Claris representative tell you it should work provided you do it by querying your ODBC data source using the Import Records or the Execute SQL script step, rather than try to add it as an external data source.

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.