remove() Function Share Share via LinkedIn Reddit Email Copy Link Print On This Page How to Change Values in an Array Using Functions in Appian This video from Academy Online explains how to change values in an array using the insert and remove functions. Function remove( array, index ) Removes the value at a given index from an array, and returns the resulting array. Parameters Keyword Type Description array Any Type Array The array to modify. index Integer or Integer Array The one-based index or array of indices whose values should be removed. Returns Any Type Array Usage considerations Using the index parameter The index value must be greater than or equal to 1. Understanding results Passing an empty array to the array parameter returns an empty array. Passing an empty array to the index parameter returns the original array value. Examples Remove one value from an array 1 remove({10, 20, 30, 40}, 4) Returns {10, 20, 30}. Remove multiple values from an array 1 remove({10, 20, 30, 40}, {2, 4}) Returns {10, 30}. Remove the second to last item in an array 1 2 3 4 a!localVariables( local!list: { 1, 2, 3, null, 4 }, remove(local!list, count(local!list) - 1) ) Returns {1, 2, 3, 4}. Remove CDTs from an array where a field matches a certain value Note: These CDT values are for reference only. If you copy and paste this expression, it will not evaluate. Use this as a reference only. 1 2 3 4 5 6 7 8 9 10 a!localVariables( local!customers: { 'type!{urn:com:appian:types:AS:FS}AS_FS_Customer'(customerId: 1), 'type!{urn:com:appian:types:AS:FS}AS_FS_Customer'(), 'type!{urn:com:appian:types:AS:FS}AS_FS_Customer'(customerId: 2), 'type!{urn:com:appian:types:AS:FS}AS_FS_Customer'() }, local!newCustomers: wherecontains(tointeger(null), local!customers.customerId), remove(local!customers, local!newCustomers) ) Returns {'type!Customer'('customerId': 1), 'type!Customer'('customerId': 2)}.' Feature compatibility The table below lists this function's compatibility with various features in Appian. Feature Compatibility Note Portals Compatible Offline Mobile Compatible Sync-Time Custom Record Fields Compatible Can be used to create a custom record field that only evaluates at sync time. Real-Time Custom Record Fields Incompatible Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. Process Reports Compatible Process Events Compatible Process Autoscaling Compatible Feedback Was this page helpful? SHARE FEEDBACK Loading...