Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lookup one changes in rl #339

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mnickolas113
Copy link

changes in reference lookup for lookupone

Copy link

netlify bot commented May 6, 2024

Deploy Preview for grist-help-preview ready!

Name Link
🔨 Latest commit 3bc211d
🔍 Latest deploy log https://app.netlify.com/sites/grist-help-preview/deploys/66391a81e863740008f3902b
😎 Deploy Preview https://deploy-preview-339--grist-help-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

help/en/docs/references-lookups.md Outdated Show resolved Hide resolved
@@ -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.

<span class="screenshot-large">*![sponsors-lookupone](images/references-lookups/sponsors-lookupone.png)*</span>
Alternatively, we could use the following formula to illustrate an example to find the earliest interaction associated with a specific contact ID:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be clearer to say "associated with a specific contact"? or "associated with the contact in the current record"?

I am also scratching my head a bit about the word "Alternatively". Reading where this goes in the article, I don't see what you meant to connect it too -- maybe you intended to place this somewhere else?

@@ -128,6 +115,22 @@ 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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the earliest interaction associated with a specific contact:
Sponsors.lookupOne(Contact_Name=$id, sort_by="Date")

The language talks about looking up an interaction, but the example looks up a sponsor. Looking earlier, it's referring to this example https://public.getgrist.com/6kTypo2FtSsf/Event-Sponsors-Attendees-References-and-Lookups/m/fork/p/2 where the Sponsors table doesn't have a Date column, and unclear what sense it would have if one were added. I think this illustration example would leave the reader confused, no?

@MichaelNickolas MichaelNickolas self-assigned this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants