Distinct or unique values on reference field / lookup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2015 10:58 PM
Hey all
On a form i have created a reference field which points to a custom table and this table has NO UNIQUE key.
So upon clicking the lookup icon, it should display only unique or distinct values like below it should show only 1200 and 1300.
VenID | Name |
1200 | ABC |
1300 | XYZ |
1200 | JKL |
I have made use of reference qualifier and wrote a code like
vendorIdList = arrayUtil.unique(vendorIdList);
This is working, but since the table has some thousands of records, its taking very long time to display the unique values.
Any other method to achieve this quickly.
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2015 11:07 PM
Hi Nikh,
You can create your field to be a choice type of field instead of a reference type.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2015 11:09 PM
By having choice type of field you can then click on the related link advanced view at the Dictionary Entry of the field. Over there you can specify whether the choice list should contain none or not, and most important you can specify the choice table which is going to retrieve the unique list of VenIDs.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2015 11:11 PM
Keep in mind to be in the advanced view of the dictionary entry of your field, otherwise you will not see the Choice Table option.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2015 11:28 PM
Hey bernyalvarado
but as I said, the values are huge. It has some 10000 records and around 800 unique values.
Thanks
Nikh