Jump to content
Server Maintenance This Week. ×

Validation and multiple fields


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

Recommended Posts

This one has me stumped.

This is from an employee production database, that

has a repeating fields that contains employee clock numbers. To make an entry in the "Actual" field (where is validation takes place). The field "Actual" validation is this:

-----------------

IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,1) or

IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,2) or

IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,3) or

IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,4) or

IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,5)

--------------

This works very good, but the problem now is that operations has requested a second employee field (EmpNo2) be added to cover the situation inwhich one employee starts a project and the second completes it.

I can not seem to get that senerio to function, when EmpNo1 must have an entry (an be in the employee clock number field) before EmpNo2 (who must also be in the employee clock number field)can make an entry into the "Actaul" field.

Any thoughts on this

Thanks

Link to comment
Share on other sites

Who have forced you away from portalizing this, wouldn't it make more sense to allow creation of new portallines - only if the last row has been completed?? Chances are that you're exaggerating the posibilities repeating fields has to offer.

We're quite a lot, who tries to convince the rest of the community that repeaters only should be deployed for utility purposes ...far ...far away from userinterfaces where validations usually rules!

--sd

Link to comment
Share on other sites

Agreed, I would have to ask why your repeating field is what holds your employee clock numbers. This could turn out bad if you need to add more info about your employees at a later date.

The main thing I use repeating fields is for a visual display validation. When they enter the wrong info into a field, I have a repeating field that will write red text next to it to say "HEY THIS IS WRONG".

As Soren said, utility purposes.

Link to comment
Share on other sites

Well, first let me say that I found a solution, but before I show it Id like to answer to the two

responses I received.

1. As to portaling. This works under a lot of conditions, but sometimes layouts are static with preset information that makes portaling inpracticle.

2. The field holding the employee number has several purposes. The empoyee number is stripped from a field that records the results of an employee's answers to a job check list. Using this method, I'm able to validate that the employee has reviewed and resposed to the checklist and that a valid employee number is being used.

Now, here's what I was able to get to work.

--------------------

IsEmpty(EmpNo2) = 1 and IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,1) or

IsEmpty(EmpNo2) = 0 and IsEmpty(EmpNo1) = 0 and EmpNo2 = GetRepetition(GetEmpNo,1) or

IsEmpty(EmpNo2) = 1 and IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,2) or

IsEmpty(EmpNo2) = 0 and IsEmpty(EmpNo1) = 0 and EmpNo2 = GetRepetition(GetEmpNo,2) or

IsEmpty(EmpNo2) = 1 and IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,3) or

IsEmpty(EmpNo2) = 0 and IsEmpty(EmpNo1) = 0 and EmpNo2 = GetRepetition(GetEmpNo,3) or

IsEmpty(EmpNo2) = 1 and IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,4) or

IsEmpty(EmpNo2) = 0 and IsEmpty(EmpNo1) = 0 and EmpNo2 = GetRepetition(GetEmpNo,4) or

IsEmpty(EmpNo2) = 1 and IsEmpty(EmpNo1) = 0 and EmpNo1 = GetRepetition(GetEmpNo,5) or

IsEmpty(EmpNo2) = 0 and IsEmpty(EmpNo1) = 0 and EmpNo2 = GetRepetition(GetEmpNo,5)

----------------

One more thought: Yeah we ask this rather limited database to do alot of things and why shouldn't we. In the world of manufacturing (and other worlds too) alot of checks and balances have to be in place to prevent quality errors.

FileMaker is a strong and hearty data base system with alot of up sides, but is woefully lacking background coding capabilities. So we have to work around that shortcoming and sometimes have to ask for help.

Link to comment
Share on other sites

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