JavaScript – removal of duplicated rows

Facebooktwittergoogle_pluspinterestlinkedinmail

author: Marcin Smarzewski

Here’s an example of a useful solution, which may be used with items lists as protection from adding duplicated rows. Is such case, simple JavaScript function may be used.

capture1
JavaScript Code

Function has to check whether given value already exist on the items list. If it does, following alert should appear:

capture22
Alert returned in case of value duplication

Such function has to be registered in Behavior tab of chosen workflow.

Capture33
Function record in Designer Studio

Function has to be called in Style and behavior tab of chosen form field, in “JavaScript to be executed on value change” field. For this example it is “Name” (DET_Att1) form field from Payroll list.

Capture44
Function call

 

Leave a Reply

Your email address will not be published. Required fields are marked *