April 1, 200817 yr 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, 200817 yr by Guest Solved, although complexly
April 1, 200817 yr Try the attached sample. It may be simpler than what I have, but mine seems pretty simple. institution.zip
April 1, 200817 yr 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 )
Create an account or sign in to comment