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
new-rl-enroll-changes #342
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
|
||
Then, the following formula would look at the Students table, find the specific students associated with each family, sort them by their birthday, and return their full name: | ||
|
||
`Students.lookupOne(Family=$id, sort_by="Birthday").Full_Name` |
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.
Let's change to return student references, and make it a reference column, both here and below.
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.
Now I totally get what you were saying. I was vastly overcomplicating it in my head!
help/en/docs/references-lookups.md
Outdated
|
||
Additionally, we have a Families page that outlines the parent of each student and we’d like to find which student in each family is the oldest. So, we would create an oldest student column. | ||
|
||
<span class="screenshot-large">*![family-table](images/references-lookups/oldest-student.png)*</span> |
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.
This screenshot is much larger, making text inside much smaller, than most screenshots in our docs. This is particularly problematic for small screens. You can resize your window before taking screenshots, or zoom in maybe(?), but it should be at a similar scale to others.
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.
This, and another file, are not used. Please review for such things and delete unneeded things (or avoid committing them in the first place).
help/en/docs/references-lookups.md
Outdated
@@ -115,6 +115,32 @@ 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 ## | |||
|
|||
The `lookupOne` function and the optional `sort_by` parameter can be used together to sort multiple matching results to determine which of them is returned. You can also prefix the column ID with "-" to reverse the order. |
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.
"to determine which of them is returned" -- I think it would be good to say how it's determined, since it's so easy (first of matches, after sorting?). Something like this perhaps? ... When the lookupOne
function encounters multiple matching results, it returns the first one by row ID. The optional sort_by
parameter can be used to sort these results by another field, to determine which one would be returned as the first match.
help/en/docs/references-lookups.md
Outdated
|
||
<span class="screenshot-large">*![family-table](images/references-lookups/oldest-student.png)*</span> | ||
|
||
Then, the following formula would look at the Students table, find the specific students associated with each family, sort them by their birthday, and return their full name: |
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.
Maybe "...and return the one student with the earliest birthday"?
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.
Thank you! Looks good, good to merge!
had to re-do a PR in the right account