Sure. Something like:
not IsEmpty (
"DON'T DELETE ME!!!"
Naturally, you would probably want to exercise more control than this. Perhaps trap the deletion using the security setup or via a "delete" script (be sure to override the "delete record" command in the menu using Custom Menus if you choose this route).
Thanks for the quick response. I am a novice at this and I tried your calculation 2 ways without success.
First I created a text field named (Do_Not Delete Flag) and created a conditional format using your Calc.
Second attempt was to change the field to calculation field and I entered your Calc.
The calculation was not rejected in either case.
How is your calculation referencing the _KP_Customer_Number in the client contact record?
not IsEmpty (Receiving Data::_kf_Contacts_Customer_Number &
Shipment Request Data::_kf_Pickup_Contact_ID &
Shipment Request Data::_kf_Ship_to_Contact_ID
"DON'T DELETE ME!!!"
The calculation was an example based on the information you provided. I don't have access to your database, so I don't know what the structure looks like. Do you have a relationship to the other tables? The basic principle is you're looking to see if the primary key in the related table is empty or not. This tells you that a record exists "over there".
So substitute the primary key of the related tables, in a calculation field, and it should work.
First, thanks again for your time.
I do not understand what I should be substituting for the primary key.
There is a relationship between the Customer table and the other tables.
Based on there being only 2 tables.
Table 1 named (Customer_Contacts) - with 2 fields named (KP_Customer_Contact_Number) and
Table 2 named (Ship_Requests) - with 1 field named (KP_Customer_Contact_Number )
I am trying to get the (Do_Not_Delete_Flag) field in Table 1 to highlight red and display DO NOT DELETE if
the (KP_Customer_Contact_Number) exists in a record in Table 2
Thanks again for your help.
In Customer_Contacts, the Do_Not_Delete_Flag should be a calculation field equal to:
not IsEmpty ( Ship_Requests::KP_Customer_Contact_Number ) ; "DO NOT DELETE" ;
Your calculation works but only for 1 record and it happens to be record # 5 of 15,082.
That doesn't give me much to go on. What "doesn't work"? What behavior are you seeing, and what are you expecting?
- Disable record delete -> custom menus
- Put a delete button on the layout
- Hide it when not IsEmpty(List(yourFirstRelationship::pk) & List(yourSecondRelationship::pk) & ....)