Sorry for the weird question as I am really just learning SharePoint and do not know the best vernacular.
at work, we have code that accesses a sharepoint list item, then selects and expands the columns so that we can use the data in those columns.
MY CONFUSION: I often see when we are selecting columns, in the react code we add a slash(/) after some of the column names and then an additional identifier to access additional data on the column.(I think this is called a lookup column)
But how can I see a list of all the available "additional identifiers" for each column
on SharePoint, the columns only show the part before the slash,
but it doesnt show whats possible to use after the slash. Such as this Title identifier
'ItemModified',
'ItemModifiedBy/Title', <- This is what I'm referring to as an additional identifier
How do I know /Title is a possibility? I mean yea, I can see it in this code that someone else wrote, but how did they know /Title was even a thing? I don't see any documentation. How do I know what other identifiers there are for me to use?
And I couldn't find anything in the documentation that lays out a list of additional identifiers for each column type (or maybe i just dont know the right terms to search), I was hoping to find something like this :
ItemModifiedBy additional identifiers:
Title
EMail
...etc
ItemCreatedBy additional identifiers:
Id
Title
EMail
...etc
Here is a small code snippet for work
const listName = ListNames().StudentList
const StudentArticlesData = []
const list = sp.web.lists.getByTitle(listName)
const endpoint = [
'ID',
'Title',
'Question',
'Description',
'Answer',
'Category',
'Subcategory',
'Tags',
'IsArchived',
'ItemCreated',
'ItemCreatedBy/Title',
'ItemModified',
'ItemModifiedBy/Title',
'AttachmentFiles',
]
const expand = ['ItemCreatedBy', 'ItemModifiedBy', 'AttachmentFiles']
const items = await list.items
.select('' + endpoint + '')
.expand('' + expand + '')
.orderBy('ItemCreated', false)
.get()
Also, they guy who created this stuff is gone, so its only me. So I can't ask questions.