Skip to main content

🔎Build a Lookup for Consolidate Records

Have you ever needed to find a Slate record using information that no longer exists on the active person record because of consolidation?

There is a suitcase for these two queries at the end!

Use Case 1: Lookup an Incorrectly Merged Record

I think I accidentally merged a twin or sibling, and it’s past 90 days. How can I find the record?

Lookup by Historical Name!

Use Case 2: Lookup With Old Slate Reference ID

I have an old Slate Reference ID, but I do not know who it belongs to!

With many SIS integrations, you will save either the Slate Record GUID or Slate Reference ID to the SIS record to make sure updates and integrations stay in sync.

However, sometimes integrations can get stuck in limbo because the import file uses the original reference ID, but a consolidation has resulted in a different Reference ID being associated with that person.

Now, you can find the current Slate record using the old reference ID (or GUID).

Building the Query

This solution is built using a Person-scoped Configurable Joins query, so it returns one row per matching (active) person record, rather than one row per consolidation event.

Slate retains historical information about consolidated records in an underlying XML column, [alias_data], on the [duplicate] table. This data can remain available well beyond the 90-day window in Consolidate Records (subject to your institution's data retention policies).

Although this column is not exposed as a standard Configurable Joins export, we can access it using a simple SQL formula.

Lookup by Reference ID

  1. Create a Person-based Configurable Joins query.
  2. Add a dependent subquery filter.
  3. Join to Duplicate Person Records (Main Record).
  4. Filter to records with a consolidation status of Merged.
  5. Change the aggregate to Formula and add the following:
[alias_data].value(
    '(/entity[table="person" and column="ref"]/value/text())[1]',
    'nvarchar(20)'
) = @lookup_id

Subquery with join to Duplicate Person Records, Merged Filter, and Custom Formula


Under Edit Web Service, add your parameter:

<param id="lookup_id" type="varchar" label="Slate Reference ID:" />

Adding Custom Parameter to Edit Web Service

You can now enter a historical Reference ID and retrieve the associated active person record, regardless of how many duplicate records have been merged into it.

Query Home Page

Lookup by Name

Using the same query structure, we can also search for a merged record using the lost record's historical first and last name.

concat(

    [alias_data].value(
        '(/entity[table="person" and column="first"]/value/text())[1]',
        'nvarchar(100)'
    ),
    ' ',
    [alias_data].value(
        '(/entity[table="person" and column="last"]/value/text())[1]',
        'nvarchar(100)'
    )
) = @lookup_name

With the corresponding custom parameter:

<param id="lookup_name" type="varchar" label="Historical Full Name:" />

Suitcase

a70ed5f0-b41c-43c5-8000-49c2851e7e0c:rwf

While I discovered this XML column independently while troubleshooting an SIS integration, I'd be remiss not to acknowledge two earlier community contributions.

Our approach builds on the same Slate-native capability, using Person-based subquery filters to make historical consolidation data searchable within ordinary Person queries.

As this technique accesses an underlying database column rather than a standard CJ export, be mindful that its structure or availability could change.

Not that we expect this XML column to go anywhere - I believe it is what feeds the 90-day recently merged history!