Deleted records and record pickers / Formula check if related record has been deleted
I have a record that appeared to be missing a related record, but wasn't showing up on a report I have for identifying records with relational issues. It turned out that there was a value in my reference field, but it was pointing to a deleted record. This was not clear at all because the record picker for the related field (I have the record in edit mode) appeared exactly as if it were null/empty.
It used to be that when a reference field had a value but there was no record in the foreign table with that id QB would display a red message indicating this, but now it simply says "Search and Select" as if there were no current value there at all. The only way to tell that there was a value there previously is to start editing the field and then hit backspace; QB will then highlight the field to indicate its value has changed (see pics). So I've been tearing my hair out staring at this record because it appeared to have a null value but it wasn't working with any of my null check formulae.
Is there any way to get the old behavior back for the record picker? I can make the id field itself read only (it's in an admin section of my form anyway) but I'd still like the user to know when about the deleted record when looking at the proxy field.
Better yet, is there a good way to check if a related record has been deleted formulaically so I can adjust my report to include these issues?
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.