Skip to Main Content
Nintex Ideas

đź‘‹ Use this site to provide feedback and ideas for all Nintex Products. See our post on Nintex Community "Welcome to Nintex Ideas" for more details on Nintex Ideas, how an idea is handled by our product teams and more!


If you have questions about Nintex Ideas, please contact ideas@nintex.com

If you require support, please visit Nintex Customer Central

If you have a sales inquiry, please contact sales@nintex.com

Categories Form controls
Created by Unknown Unknown
Created on Sep 19, 2023

De-duplicate list lookup results

On a Nintex Workflow start form, using a list lookup control with a filter often results in duplicate values being displayed.

May I propose a small addition to NF.BaseDataAcessHelper.js in the updateControl function.

// added at NintexForms\NF.BaseDataAcessHelper.js line 625 of v4.6.6

if(items.split(';').length > 1){

var arr = items.split(';')

const hashTable = {};

const result = [];

for (let i = 0; i < arr.length/2; i+=2) {

if (!hashTable[arr[i+1]]) {

hashTable[arr[i+1]] = true;

result.push(arr[i],arr[i+1]);

}

}

items = result.join(';');

}


  • Attach files
  • Unknown Unknown
    Reply
    |
    Sep 19, 2023

    Oops, Corrected!


    if(items.split(';').length > 2){
    var arr = items.split(';')
    const hashTable = {};
    const result = [];
    for (let i = 0; i < arr.length; i+=2) {
    if (!hashTable[arr[i+1]]) {
    hashTable[arr[i+1]] = true;
    result.push(arr[i],arr[i+1]);
    }
    }
    items = result.join(';');
    }