Query on Previously Used Contact Types

Options
I'm wondering if anyone knows how to run a query to find any contact types which may have been used in the past, weren't actually deleted from the record but instead the contact checkbox is unchecked.  When I try to run a query with those who have the type it doesn't find them because they're not "officially" contacts of that type anymore.  But I can't delete the table entries because I'm told the table entry is still in use.  I know I can make the table entries inactive but I'd prefer to just delete ones which should never have been a contact type anyway (ex-..., son(!?), business).  Thanks.

Comments

  • I'm with you on this one, I also prefer to delete table entries that should never have been there in the first place rather than just deactivating them. Although they don't show on the constituent record, they still clutter up queries.


    Are those table entries definitely in use on a relationship; that table hasn't also been used for an attribute or something? When I untick the Contact box on a relationship, it removes the value from the Contact Type field so I would have thought that means you can't have a contact type for someone who's no longer marked as a contact.


    The Contact Type field is also available in query under both the Individual and Organisation relationship nodes, not just under the Contact relationship node, so you could try using those for your criteria instead maybe? I don't know if that'll work though, I can't test it as I'm unable to replicate your issue on our database.
  • Dariel Dixon 2
    Dariel Dixon 2 ✭✭✭✭✭
    Seventh Anniversary Facilitator 4 Name Dropper Photogenic
    I think you are having trouble because your query can't find the non-constituent relationships.  I believe you have to tweak your query in a way so that you're looking to see if the relationship exists, not necessarily the person.  Anytime you're using query to find non-constituents, you may come across this issue.
  • Karen Diener 2
    Karen Diener 2 ✭✭✭✭✭
    Ancient Membership Facilitator 3 Name Dropper Photogenic
    I think you're right that it cannot find the contact type because the "is contact?" box is no longer checked.  I wasn't convinced, but just tested that scenario and got the same result.


    The other issue you might have is that a contact type may be selected on an action and possibly a participant record if you have the Event module.


    My guess is that you'll have to use import in some way, in order to fix it.  But that is without any actual testing and about 30 seconds of thought put toward it!


    Karen

Categories