-
Notifications
You must be signed in to change notification settings - Fork 21
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for grist-help-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
help/en/docs/references-lookups.md
Outdated
@@ -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: |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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?
changes in reference lookup for lookupone