Topher Posted April 1, 2008 Posted April 1, 2008 (edited) I'm trying to make an "isDeletable_Boolean" calculation field and I can't quite wrap my head around it. I want to make sure that if the Institution_ID is used anywhere else in the database (which could be in students, courses, contacts, professors, etc.) you cannot delete the institution. I've done this before but it has usually been much simple with just one referenced field using If ( Count (student::constant) > 0 ; 0 ; 1 ). But now I need to check in many different places. Thanks for any help. UPDATE: Well, I solved it but my solution is definitely not very simple. I'm not sure if there's something out there that is simple. Edited April 1, 2008 by Guest Solved, although complexly
jstaphse Posted April 1, 2008 Posted April 1, 2008 Try the attached sample. It may be simpler than what I have, but mine seems pretty simple. institution.zip
mr_vodka Posted April 1, 2008 Posted April 1, 2008 Your calc of If (UsedCalc>1;0;1) will not work when there is only one related record, in which case it will flag it as delete. It should be (UsedCalc > 0; 0; 1 ) Also instead of two calc, you can use one calc simplified to: not ( courses::InstID + professors::InstID + students::InstID )
Recommended Posts
This topic is 6079 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 accountSign in
Already have an account? Sign in here.
Sign In Now