How to Prevent Duplicate Forms?


I have a form that is used to collect customer satisfaction data. I pass it the servicedesk ticket number as parameter as follows:

However the user can if they want click on the link and submit a form more than once for the same ticket number. Is there a way to prevent this?

Many Thanks


Hello @ATerry,

You can check whether the feedback for the specific ticket exists or not using PnP js and if yes, for instance, redirect a user to a Form set with the error message.

Add the code to the Custom Routing section:

var web = new Web('Site URL');
const queryString =;
const urlParams = new URLSearchParams(queryString);
const ticket = urlParams.get('Ticket');

return web.lists.getByTitle('List Name')"Title").filter("Title eq '" +  ticket + "'").get().then(function(item) {
    if(item.length > 0) {
        return 'c46596f4-3325-43d5-86f9-77fc72d52ad4'