Jump to content

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

Recommended Posts

Posted

I have a system for registering sales and Sales People. Each Sales Person belongs to a Branch, and some Branches have Departments. I want to make sure that the Dept is entered for those who belong to Branches WITH Depts. On the other hand, I don't want the validation to be triggered when there are NO Depts for the particular Branch the Sales Person belongs to. Branches are kept in one file, Depts in another. I 've tried Validate by Calculation:

Case(Count(bsg|fk_branch_id::pk_dept_id)>0, not(IsEmpty(fk_dept_id)), "")

but it doesn't work. It keeps demanding that a value be entered in fk_dept_id even for those Sales People who belong to a Branch with no Depts registered for them.

Any ideas?

Posted

how about:

case(not isempty(branchID::c_deptID), not isempty(t_deptID))

where c_deptID would be a calc in your branch file using relationship to dept. to pull the first deptID from the Dept file.

Are Sales people only affiliated with one branch of a dept. with multiple branches? if so, why not automate the process.

Posted

Sorry, forgot about boolean neccesity of define fields validation. your original formula should work without the case():

Count(bsg|fk_branch_id::pk_dept_id)>0

as well as mine should work without the case():

not isempty(branchID::c_deptID)

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