Skip to main content

 

Hello everyone, 

 

Thanks to Palesa Sikwane‌'s endless nagging but most importantly his ability to always help me, I finally decided to get to it, this is my first time writing a blog post.  Thanks Palesa Sikwane‌ happy.png

 

Did you ever have a request where by a user can't submit duplicate entries to a SharePoint list?

 

Well I did, given that the out of the box survey solution on SharePoint wasn’t going to help me much.

Users have to complete a survey and attach a document if necessary. The requirement was that we restrict the user to submitting one application ONLY.

 

After a long time of using google, i finally found a work around.

 

User submits and tries to submit at a later stage.

 

The end result is:

 

 

How did I achieve this?

 

Resources:

SharePoint 2016 on-premise

List library

Nintex Responsive Forms 2016

Nintex Workflow 2016

 

I created the list and customised the item form using Nintex's responsive form designer.

Fields:

 

  1. Staff Name
  2. Id Number
  3. Employee Number
  4. Position
  5. Department
  6. Highest Standard Completed At School
    • Grade 12 
    • Grade 11
    • Other
  7. Name of High School
  8. Year Completed
  9. Highest Tertiary Qualification 
    • Certificate
    • Diploma
    • Degree
    • Post Graduate
    • None
  10. Field Of Specialisation / Major Of Your Tertiary Qualification

  11. Year Tertiary Qualification Completed

  12. Name Of The Institution

  13. Are You Currently Studying?

 

 

 

After building my form to manage the questions for the survey adding rules for validation & to disable a field if necessary or hide the field.

 

When the form opens, it pre-populates the current user's details (Fields 1-5), this only occurs when the form is in New Mode.

 

 

After completing the form I submit it, I am then redirected to a Thank you page and the workflow kicks off assigning a reference number to the item.

 

Thank you page

 

 Workflow

 

 

 

Should I try to submit the form again I have a check in the form when it loads.

 

In order to achieve this; I added a calculated field to the form, also I added a rule to the field, which hides the field regardless of the view. In the configuration setting of the field I added the following formula lookup(list title, column to filter on, value to filter on, output column)

lookup("Survey", "Created By",CalcName ,"Reference")

 

This formula basically shows that’s im querying the list "Survey", and filtering on the column "Created By" using the value from the current form "CalcName" and I'm returning the reference number.

 

If my calculated field return a value, the error message displays and hides the submit and cancel button.

Bitmoji Image

Mohamed Gathoo‌ this is great stuff!! Will definitely share this with some other partners and customers who have a similar requirement


Good post Mohamed!  Thank you for sharing!


Is there a way to lookup on multiple columns instead of one?  I am trying to remove duplicates based on all columns (total 3).


I've attempted to recreate this, however it is not clear how you set the CalcName  - meaning are you pulling Created by in the formula? i am not quite successful on doing the same process that was indicated in the formula.


Hello! In your survey I have specified my major, name of institution and year of graduation. However, I am studying for my second degree and I do not know what to write down about question 'Year Tertiary Qualification Completed' because I am still studying. Could you please help me?



writemyessaytoday



 



 


Dear Mohamed,



The post looks awesome, need more clarification on how you are updating reference number through workflow, what calname here. it would be great help. thanks in advance. thank you.


Reply