Hi,
I have a Sharepoint list named "Master" where I have three columns with the following data types:
- Title - Single line text
- MasterId - Single line text
- Requester - Person
My purpose is to get the details of the Request in the list, but it is being displayed as "undefined"
so I tried tweaking the definition of "Master" interface as below:
export interface Master { Title: string; Id: string; MasterId: string; Requester: { Email: string; };
}and the list printing part as below, expecting to get atleast the email address of the person:
private _renderList(items: Master[]): void {
let html: string = '';
items.forEach((item: Master) => { html += `<ul> <li><span class="ms-font-l">${item.Title}</span><ol> <li>${item.MasterId}</li> <li>${item.Title}</li> <li>${item.Requester.Email}</li></ol> </li></ul>`;
});But now, I am getting an error. Can you help me to solve this problem.
Question 2:
I need to send a post request to save new row to the same list, here also I don't know how to get the current user to the person data type. Please assist me on that too.
Best Regards,
Isham Mohamed