Jump to content

How to validate Field_B based off value of Field_A


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

Recommended Posts

  • Newbies

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

Link to comment
Share on other sites

  • Newbies

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.

Link to comment
Share on other sites

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