IF Contanis for custom function
-
Hello,
In the function editor I have this custom function:
function revision($rev_laptops) { $rev_laptops = array("rev.1", "rev.2", "rev.3", ""); $rand_keys = array_rand($rev_laptops, 2); $newrev = $rev_laptops[$rand_keys[0]] . ""; // random rev.1, rev.2 or rev.3 echo $newrev; }
I want to get this $newrev and pass it to the Text editor but in IF/Contains statemet. Is this possible?
Somethig like this:
[IF({newrev[contains(.,'rev.1')]})] Show Text 1 with some field from the csv file {name[1]} [ENDIF] [IF({newrev[contains(.,'rev.2')]})] Show Text 2 with some field from the csv file {name[1]} [ENDIF] [IF({newrev[contains(.,'rev.3')]})] Show Text 3 with some field from the csv file {name[1]} [ENDIF]
Thank you!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘IF Contanis for custom function’ is closed to new replies.