I need to filter based on Title, then check whether the same row value exists in any other row in the sharepoint list, if present throw an error else update an item to the list
Hello @Madhumitha_Umanath ,
Welcome to Plumsail Community!
You can check if the value exists in SharePoint list using PnPjs function. See the example in this post:
Dear @DryChips ,
Close, but not quite. Try it like this:
var ccexists = false;
fd.spRendered(function(){
fd.validators.push({
name: 'CostCentreExistsValidator',
error: "Cost Centre doesn't exist",
validate: function() {
return ccexists;
}
});
fd.field('Cost_centre_test').$on('change', function(value){
validateCC(value);
});
});
function validateCC(value){
var filter = "Title eq '" + value + "'";
pnp.sp.web.lists.getByTitle("Org Hi…