Start a new topic

Test for Spouse Record

Hi,

We have an import for parents of students.  The file has parent 1 and parent 2.  Parent 1 is the main import ID.  We want to check if Parent 2 exists in RE and do some stuff if they do.  If they don't exist we want to add them as a non-constituent spouse to parent 1. 

I can't just check the spouse field of Parent 1 because parent 2 could exist in our database but may not be "linked" with parent 1. 

The only way I can think of to do this in one pass is to loop through all the records in RE and check if Parent 2 exists.  Is there any other (possibly quicker) way to check for this?  

Any help would be greatly appreciated.

Thanks.

Lisa Folger


Hi Lisa,

There is an event like "BeforeIndividualRelationshipSave()" (or similar) that you might be able to use. Unfortunately the constit will already have an ID, because we need to save them before the relationship can be saved, however you could check to see if DateCreated is today, in which case you might be able to assume it's brand new (the 'might' would be based on your business processes, I suppose). There might also be other fields you can use during this event as indicators.

Jeff
Thanks! I'll try that. It just might work.
Login or Signup to post a comment