Hello friends, please, I need to update this record (formationsIds = typeFormation.formationsIds ) but with the following condition: if the (formationsNames) contains the term "Valide."
help with a syntax formula
Collapse
X
-
That would not work string/contains search in a string and formationsNames is an array. If valide is a name of the formation record you can try code below:
PHP Code:if (array\length(formationsIds) > 0) { $i = 0; while($i < array\length(formationsIds)) { $name = record\attribute('Formation', array\at(formationsIds, $i), 'name'); if (string\contains($name, 'Valide')) { entity\addLinkMultipleId('formations', array\at(formationsIds, $i)); } $i = $i + 1; } }
Rabii
Web DevComment
-
I tried that too.
PHP Code:if (array\length(classe.formationsIds) > 0) { $i = 0; while($i < array\length(classe.formationsIds)) { $name = record\attribute('Formations', array\at(classe.formationsIds, $i), 'name'); if (string\contains($name, 'Valide')) { entity\setAttribute('Meeting', $i); } $i = $i + 1; } }
Comment
-
PHP Code:$name = record\attribute('Formations', array\at(classe.formationsIds, $i), 'name');
Formations ??? it should be single - name of the entity should be always single.Rabii
Web DevComment
Comment