I have a multi-enum field in my Entity. When the user saves, I want to create a related record for each value selected in the multi-enum.
Can I create a "For Each" type loop in a Formula?
Can I create a "For Each" type loop in a Formula?
$i = 0; while( $i < array\length(processes), ( $id = record\create( 'SubTask', 'name', array\at(processes, $i) ); entity\addLinkMultipleId('subTasks', $id); $i = $i + 1; ) );
Comment