Forum Discussion
In the old grid edit mode, if I click on a reference field (which is blank because the value no longer exists) like I'm going to edit it, it will show the existing/deleted value.
Regarding checking if a related record has been deleted: I think you would need some separate record or way to know if it was deleted, like a history table. But if you just want to know if it's not there (i.e., missing), you could have a formula query based on whatever is the common/related factor.
- Jonathan_Gibson4 months agoQrew Cadet
Ooh, yeah, It looks like I can work something out utilizing Size() and GetRecord(). Thanks for the suggestion!
- JCY4 months agoQrew Trainee
I've done something similar before using a query like this:
var text query = "{17.EX.'" & ToText([Reference Number]) & "'}"; var RecordList matches = GetRecords($query, [_DBID_CONTACTS]); ToNumber(Size($matches) > 0)Good luck.
- Jonathan_Gibson4 months agoQrew Cadet
Here's what I came up with that seems to work for my purposes. As a report formula I have:
var number donorCount = Nz(Size(GetRecord([Related Donor], [_DBID_Donors]))); var number contactCount = Nz(Size(GetRecord([Related Contact], [_DBID_Contacts]))); $donorCount <> 1 or $contactCount <> 1I created a filter to show only records where this formula evaluates to true. Then I have another report formula I'm using as a display column, in which I use those same variables (redeclaration omitted for brevity):
List("<br><br>", If($donorCount = 1, "", "<b>Donor #" & [Related Donor] & " not found</b>"), If($contactCount = 1, "", "<b>Contact #" & [Related Contact] & " not found</b>") )This way I can include any other issues I want to surface in the same column on the report.