Array functions - hdijkema/espocrm-hookedformulas GitHub Wiki

Array\Set

NEW-ARRAY = Array\Set(ARRAY, INDEX, VALUE)

Sets the given index of array to value and returns the modified array. Note!: array\set(ARRAY, INDEX, VALUE) without assigning the returned array is a no-op.

Example:

$a = list(1, 2, 3);
array\set($a, 1, 'hi');  // NO-OP!
$a = array\set($a, 1, 'oke'); // gives (1, 'oke', 3)
⚠️ **GitHub.com Fallback** ⚠️