From 5a13531ba4408db470ea71bd63df733becff6f29 Mon Sep 17 00:00:00 2001 From: mnickolas113 <71398255+mnickolas113@users.noreply.github.com> Date: Mon, 6 May 2024 00:57:04 +0000 Subject: [PATCH 1/5] lookup one changes in rl --- help/en/docs/references-lookups.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/help/en/docs/references-lookups.md b/help/en/docs/references-lookups.md index 938c3aa07..3430e227d 100644 --- a/help/en/docs/references-lookups.md +++ b/help/en/docs/references-lookups.md @@ -98,6 +98,19 @@ Such a formula returns a reference. In the screenshot above, you can see the loo It's often a good idea to create a column for the lookup result and change its type to Reference, as you see in the screenshot below. Then, if there is a match, the reference column will point to the entire matched record. Like any reference column, you can select which field from that record to show. In this example, it shows the Company field of the matched record in the Sponsors table. *![sponsors-lookupone](images/references-lookups/sponsors-lookupone.png)* +Alternatively, we could use the following formula to illustrate a clear example to find the earliest interaction associated with a specific contact ID: + +``` +Interactions.lookupOne(Contact=$id, sort_by="Date") +``` + +Specifically, sort_by causes multiple results to be sorted by Date, in ascending order, and since lookupOne returns the first of the matches, it becomes the earliest date. + +Additionally, we can use the (-) symbol and reverse the order, finding the latest interaction: + +``` +Interactions.lookupOne(Contact=$id, sort_by="-Date") +``` ## lookupOne and dot notation From 6fe462f87de506d02d681d50f087367e88e0a66f Mon Sep 17 00:00:00 2001 From: mnickolas113 <71398255+mnickolas113@users.noreply.github.com> Date: Mon, 6 May 2024 01:02:55 +0000 Subject: [PATCH 2/5] lookupone-change-3 --- help/en/docs/references-lookups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/help/en/docs/references-lookups.md b/help/en/docs/references-lookups.md index 3430e227d..7ac4d9c2b 100644 --- a/help/en/docs/references-lookups.md +++ b/help/en/docs/references-lookups.md @@ -98,7 +98,7 @@ Such a formula returns a reference. In the screenshot above, you can see the loo It's often a good idea to create a column for the lookup result and change its type to Reference, as you see in the screenshot below. Then, if there is a match, the reference column will point to the entire matched record. Like any reference column, you can select which field from that record to show. In this example, it shows the Company field of the matched record in the Sponsors table. *![sponsors-lookupone](images/references-lookups/sponsors-lookupone.png)* -Alternatively, we could use the following formula to illustrate a clear example to find the earliest interaction associated with a specific contact ID: +Alternatively, we could use the following formula to illustrate an example to find the earliest interaction associated with a specific contact ID: ``` Interactions.lookupOne(Contact=$id, sort_by="Date") From 700c2431083920222bd0f7386d1442b7f30cb7c8 Mon Sep 17 00:00:00 2001 From: mnickolas113 <71398255+mnickolas113@users.noreply.github.com> Date: Mon, 6 May 2024 15:20:51 +0000 Subject: [PATCH 3/5] change with backticks --- help/en/docs/references-lookups.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/help/en/docs/references-lookups.md b/help/en/docs/references-lookups.md index 7ac4d9c2b..9c37bbbce 100644 --- a/help/en/docs/references-lookups.md +++ b/help/en/docs/references-lookups.md @@ -98,13 +98,13 @@ Such a formula returns a reference. In the screenshot above, you can see the loo It's often a good idea to create a column for the lookup result and change its type to Reference, as you see in the screenshot below. Then, if there is a match, the reference column will point to the entire matched record. Like any reference column, you can select which field from that record to show. In this example, it shows the Company field of the matched record in the Sponsors table. *![sponsors-lookupone](images/references-lookups/sponsors-lookupone.png)* -Alternatively, we could use the following formula to illustrate an example to find the earliest interaction associated with a specific contact ID: +Alternatively, we could use the following formula to illustrate an example to find the earliest interaction associated with a specific contact: ``` Interactions.lookupOne(Contact=$id, sort_by="Date") ``` -Specifically, sort_by causes multiple results to be sorted by Date, in ascending order, and since lookupOne returns the first of the matches, it becomes the earliest date. +Specifically, `sort_by` causes multiple results to be sorted by Date, in ascending order, and since `lookupOne` returns the first of the matches, it becomes the earliest date. Additionally, we can use the (-) symbol and reverse the order, finding the latest interaction: From 9e21cecae50b9f9cd82cd149e0e4d610419e5285 Mon Sep 17 00:00:00 2001 From: mnickolas113 <71398255+mnickolas113@users.noreply.github.com> Date: Mon, 6 May 2024 17:57:18 +0000 Subject: [PATCH 4/5] new heading/text for sort by and lookupOne --- help/en/docs/references-lookups.md | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/help/en/docs/references-lookups.md b/help/en/docs/references-lookups.md index 9c37bbbce..e4fa3690b 100644 --- a/help/en/docs/references-lookups.md +++ b/help/en/docs/references-lookups.md @@ -98,19 +98,6 @@ Such a formula returns a reference. In the screenshot above, you can see the loo It's often a good idea to create a column for the lookup result and change its type to Reference, as you see in the screenshot below. Then, if there is a match, the reference column will point to the entire matched record. Like any reference column, you can select which field from that record to show. In this example, it shows the Company field of the matched record in the Sponsors table. *![sponsors-lookupone](images/references-lookups/sponsors-lookupone.png)* -Alternatively, we could use the following formula to illustrate an example to find the earliest interaction associated with a specific contact: - -``` -Interactions.lookupOne(Contact=$id, sort_by="Date") -``` - -Specifically, `sort_by` causes multiple results to be sorted by Date, in ascending order, and since `lookupOne` returns the first of the matches, it becomes the earliest date. - -Additionally, we can use the (-) symbol and reverse the order, finding the latest interaction: - -``` -Interactions.lookupOne(Contact=$id, sort_by="-Date") -``` ## lookupOne and dot notation @@ -128,6 +115,21 @@ The entire formula would be `Sponsors.lookupOne(Contact_Email=$Registration_Emai Now, we have the Sponsor Level listed in the All Registrations table for those attendees whose emails also appear on the sponsor list. +## lookupOne and sort_by + +Now, let’s say we added a date column as the event has stretched over the course of a few days and we want to see when an attendee has been present. We could use the following formula to illustrate an example to find the earliest interaction associated with a specific contact: + +``` +Sponsors.lookupOne(Contact_Name=$id, sort_by="Date") +``` +Specifically, `sort_by` causes multiple results to be sorted by Date, in ascending order, and since `lookupOne` returns the first of the matches, it becomes the earliest date. + +Additionally, we can use the (-) symbol and reverse the order, finding the latest interaction: + +``` +Sponsors.lookupOne(Contact_Name=$id, sort_by="-Date") +``` + ## Understanding record sets Sometimes a record may reference multiple records in another table. Multiple references can be made with a Reference List Column. From 3bc211d20717d41af42849d8144ddfdbfefb8399 Mon Sep 17 00:00:00 2001 From: mnickolas113 <71398255+mnickolas113@users.noreply.github.com> Date: Mon, 6 May 2024 17:59:21 +0000 Subject: [PATCH 5/5] changes to lookupone-rl --- help/en/docs/references-lookups.md | 1 + 1 file changed, 1 insertion(+) diff --git a/help/en/docs/references-lookups.md b/help/en/docs/references-lookups.md index e4fa3690b..201a2e30f 100644 --- a/help/en/docs/references-lookups.md +++ b/help/en/docs/references-lookups.md @@ -122,6 +122,7 @@ Now, let’s say we added a date column as the event has stretched over the cour ``` Sponsors.lookupOne(Contact_Name=$id, sort_by="Date") ``` + Specifically, `sort_by` causes multiple results to be sorted by Date, in ascending order, and since `lookupOne` returns the first of the matches, it becomes the earliest date. Additionally, we can use the (-) symbol and reverse the order, finding the latest interaction: