How to iterate through regular single line text variables in an onChange Client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 02:33 PM
//Match variables from list above to look for duplicate values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 03:20 PM
Hi, having hundreds of fields on your form and querying hundreds of fields for duplicates is most likely going to result in a less than pleasant user experience. Can you clarify your use case\business requirements?
Also, while this is an onChange() client script you don't actual check if newValue is a duplicate of anything.
Rather than checking 100's of fields in 1 script for a duplicate, your requirement could be met by xx onChange scripts that check if newValue is a duplicate of a smaller subset of data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 04:49 PM
I can't go too far into details.
Our facts:
- Mobile app cannot be used
- I am using platform as opposed to portal (related to form being hands free)
- Requirement bulk scanning a couple of assets or up to 200 assets at a time (most is already working)
- In most cases I am using JSON pairs to speed up scripts.
Now, I just need to deal with human error:
1. No duplicate values on form exist
2.Duplicate of value does not exist in system,
(I planned on addressing this in workflow about where the asset is created, with just an If & a simple encoded query.)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 03:38 PM
Are you using a multi-row variable set or are these variables you created?
If you create too many variables, it will be very tough to manage in future and can break easily.
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 04:22 PM
Hi you can create 3 arrays for the variables above like aTag,macAdd, and srlNBr2.