Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

How to validate Field_B based off value of Field_A


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

Recommended Posts

  • Newbies
Posted

Hi,

I have been trying to validate that Field_B is not empty, but only if the value of Field_A has been set to "other."

When I insert a calculation into Field_B's validation options in the database everything works as expected. The problem is that I cannot get Web Companion to return any error at all.

At the moment I am using Filemaker 5.5 with WC 5.5.4.1 (Windows XP)

smirk.gif

  • Newbies
Posted

Note to self

Figured it out.

A. Fields are only validated if they are in fact modified. Unchecking the "Validate only if field is modified" option in the validation options of the database renders them un-validated to Web Companion. This is not true in the FileMaker client, which will continue to validate the field even if you do not modify it. This little tid-bit of information cost me the better part of a rainy Saturday (so who cares)...

B. Handy way around this is to pre-populate the field on the HTML form with an innocuous 'space' character. Submitting the form will then *modify* the field; thus, invoking validation calculations.

C. So as not to screw up the calculations with the once innocuous now troubling 'space' character, the validation calculations should have the following added in place of appropriate references to the field:

Substitute( [FieldIWantToValidate], " ", "" )

TA-DA, and now off to view some porn.

Posted

u coudl also use JavaScript to validate hidden form fields holding your values from DB.....prior to any submittion...anyhow, it seem that u got it resolved

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