I'm using pnp.sp.serach to search files and folders.
I need to search by file's and folder's date.
I see results have properties LastModifiedTime, but the value came undefined.
pnp.sp.search({
Querytext: query,
RowLimit: 20,
StartRow: 0,
SelectProperties: ["Title", "Author", "Path", "FileType", "RefinersTextListOWSTEXT"]
})
.then((results) => {
results.PrimarySearchResults.forEach((result) => {
_results.push({
title: result.Title,
description: result.HitHighlightedSummary,
link: result.Path,
author: result.Author,
filetype: result.FileType,
path: result.OriginalPath,
date: result.LastModifiedTime
});
});
})
.then(
() => { resolve(_results); }
)
.catch(
() => { reject(new Error("Error")); }
);
ModifiedOWSDATE
? Let me know if it works for you!SelectProperties: ["Title", "Author", "Path", "FileType", "RefinersTextListOWSTEXT","ModifiedOWSDATE"]