/
Out Of Range Item Data in Form

© 2025 IQVIA - All Rights Reserved

Out Of Range Item Data in Form

Summary

This method searches through the enclosing FormData, inspecting each ItemData within. It returns “Y” if the any ItemData NOT canceled and also is out of range.

Form Setup

None required.

Formal Expression

var itemGroups = formJson.form.itemGroups; if (itemGroups && itemGroups.length) { for (var i = 0; i < itemGroups.length; i++) { var itemGroup = itemGroups[i]; if (itemGroupHasOorItem(itemGroup)) { logger('ItemGroup '+itemGroup.name+' has an item out of range'); return "Y"; } } } return "N"; function itemGroupHasOorItem(itemGroup) { var items = itemGroup.items; var item = itemJson.item; for (var i = 0; i < items.length; i++) { if (items[i]) { item = items[i]; if (item.canceled != true && item.outOfRange == true) { logger('Item '+item.name+' is out of range'); return true; } } } return false; } /* Finds the first match of an itemGroup from the given form. Optionally uses itemGroupRepeatKey as well */ function findFirstItemGroupByName(formJson, itemGroupName, itemGroupRepeatKey) { var itemGroups = formJson.form.itemGroups; if (itemGroups && itemGroups.length) { for (var i = 0; i < itemGroups.length; i++) { var itemGroup = itemGroups[i]; if (itemGroupRepeatKey == null || itemGroupRepeatKey == itemGroup.itemGroupRepeatKey) { if (itemGroup.name == itemGroupName) { return itemGroup; } } } } return null; } }

Related content

Out Of Range Item Data in Item Group
Out Of Range Item Data in Item Group
More like this
Flatten List of Items
Flatten List of Items
More like this
Method Library
Method Library
Read with this
collectCompletedFormData
collectCompletedFormData
More like this
Data Quality Checks Dashboard Component
Data Quality Checks Dashboard Component
Read with this
Sort Date Values and Return Most Recent
Sort Date Values and Return Most Recent
More like this

Exported and Printed Copies Are Uncontrolled