I have List or library component in my Plumsail form which is connected to another sharepoint list.
In Javascript editor i have code that filter my List or library. Is there any way to get filtered values from it?
List or library have three columns - Title, Name, Country.
I think the simplest way to achieve this is to get all items from List or Library and sort them with JavaScript like so:
let items = listOrLibrary._widget.dataItems(); // get the items from List or Library
let filteredItems = [];
for (let i = 0; i < items.length; i++) {
if (items[i].Title == "Required title") filteredItems.push(items[i]); // sort the items, change the condition to fit your needs
}
for (let i = 0; i < filteredItems.length; i++) {
console.log(filteredItems[i].ID);
console.log(filteredItems[i].Title);
console.log(filteredItems[i].Name);
console.log(filteredItems[i].Country);
}