Jump to content

Condition-insisting on field value if another field has one


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

Recommended Posts

This is probably a really stupid question and I'm not sure if it would be done as a script or defining the field, but here goes...

Does anyone know how to ensure that a field will have a value if and only if another field isn't empty?

I have a "Measurement" field (text) and if it's not empty, then the numeric "Rating" field must also have a value. If "Measurement" IS empty, then "Rating" must be empty.

Also, in case it matters, in the define field options, "Rating" is validated by RANGE (must be 1 to 5) and MAXIMUM (3 characters).

Since this is a web database, validation occurs when they Submit the record. The Range and Maximum validations work, but I don't know how to ensure that there will be a Rating value if Measurement has one (and there won't be a Rating value if Measurement doesn't have one).

Any help would be appreciated.

Thanks!

Stephie

Link to comment
Share on other sites

Use the field validation option on your "Range" field.

Check the options that apply to your description:

Here is a look at what you could check and the calculation to verify that there is data in the Measurement field.

HTH

Lee

p.s., I hate using PDF, but I don't have the time to run them through a different program.

Picture_3.pdf

Picture_4.pdf

Edited by Guest
p.s.
Link to comment
Share on other sites

Thanks for the suggestion. I think an auto-enter field happens initally when the record is created, which won't work, i.e., people will come into the web and add the ratings AFTER the measurements are already in their fields. So that would mean that the CFO (who has the host machine) would have to deal with the validation messages if he browses through these records after he runs the script to add the measurements (and before the people go in through the web and add ratings). But I think what Lee proposed will work and I'm going to try that right now.

Stephie

Link to comment
Share on other sites

If the data is already entered, you are correct that you can not correct it using the Auto Enter Feature. What do you want to do with the old data if it doesn't meet your new requirements. Flag for user correction, remove the data that doesn't have to be there, insert the data that needs to be there (Provided there is a way to figure that out), etc.

Lee

Link to comment
Share on other sites

Lee,

Thanks for your solution. It works perfectly for me as long as I remove the custom message. I guess it doesn't show up on the web so there's no way to know that it didn't validate, but if I turn off the custom message, I do get a Filemaker validation error message which tells what's wrong.

Thank you very much. (My CFO will be very happy with this ;)-)

Stephie

Link to comment
Share on other sites

There isn't any old data in there. Each Performance Review has Performance Measures (Measurement) 1 thru 10 but whether or not a person's form lists 10 measures depends on his job. Some jobs only have 5 measures to assess. So a lookup brings in all the measures for an associated form, but the ratings are blank until the person goes in and fills out his assessment and adds the rating of 1-5 for that performance measure. I hope I explained that right.

Stephie

Link to comment
Share on other sites

Well, I spoke too soon. I get the attached message when I try to log out, even though I have gone back to that rating field and taken out the rating since there was no measure associated with it. (It lets me save the record without any message but won't let me log out.) I'm not sure which validation isn't passing though.

Stephie

validation.jpg

Link to comment
Share on other sites

If you have entered data in Measurement, then you should have the option of either leaving the Rating field blank, or entering a choice of 1,2,3,4,5 or up to three numbers. However, if I'm reading what you are wanting to do, then I question being able to choose more than one digit for Rating.

It sounds like you are wanting to create a performance review report, using text description, and an numerical value.

If so, why would you have more than one digit for a covered area, and why not just use a checkbox for Rating?

Lee

[color:red]two additions

How come your field name changed?

Also, I think what you wanted was text in all Measurement Fields and if there is text in a Measurement Field, then there MUST be a Rating.

Edited by Guest
additions
Link to comment
Share on other sites

I forgot that the field was called Measure rather than Measurement, but otherwise was just giving one example rather than go into a lot of detail. Actually there are up to 10 Measures for each assessment (Measure1 thru 10 which are "looked up" so that they can be changed on an individual's assessment if the supervisor wants to change it, which doesn't happen often); and up to 30 rating fields for each assessment, i.e., SelfRating1 thru 10, SupvRating1 thru 10, and TeamLeadRating1 thru 10, which are dependent on an actual Measure being there to assess.

The ratings are 1.0 through 5.0 but can be 3.5, 4.2, etc., depending on the person's performance. That's not something I can change (set by management) and since most people get between 3 and 4.5, it does make a big difference to have those tenths of a point available. The CFO demoed the db and acidentally put 45 in instead of 4.5 for a rating and the db took it so he asked me to see if I could limit it.

Stephie

Link to comment
Share on other sites

Also, the Measure fields are Text and if there is a Measure that the person is being assessed by (such as productivity), then there MUST be a rating by each of the 3 people assessing him. And these ratings are weighted so the rating x weight give the weighted rating for each measure. Stephie

Link to comment
Share on other sites

This topic is 5768 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
 Share

×
×
  • Create New...

Important Information

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