Hello! I’m still hoping for some help with this. Is there anyone who can help me add some code to my page so that my table displays only those tasks which belong to a particular client? I have several datasets attached to this page. One in particular is the Client Database dataset. I need the tasks displayed on the table, to be only those tasks that are assigned to the client who is logged in.
I’ve made updates to the code since my first post. Here’s the code currently being used on the page:
// Import statements
import wixData from “wix-data”;
$w.onReady(function () {
// All code runs here after page is loaded
});
export function filterDropdown_change() {
$w(“#taskDataset”).onReady( () => {
if ($w(‘#filterDropdown’).value === ‘Any Status’) {
$w(“#taskDataset”).setFilter( wixData.filter() );
} else
{
$w(“#taskDataset”).setFilter( wixData.filter()
.eq(“taskStatus”, $w(‘#filterDropdown’).value)
)
.then( () => {
console.log("Dataset is now filtered by " + $w(‘#filterDropdown’).value);
} )
.catch( (err) => {
console.log(err);
} );
}
});
}