scot ranney
: scot at, scotsscripts d0t com
01/30/2020 19:37 p.m.
01/30/2020 19:37 p.m.
As it turns out, you can search arrays with multiple members, but you must put the value of all the members (in the right order) in the search term. The code below returns 2:
<MvASSIGN
NAME
="
l.petinfo:name
"
VALUE
="
{ 'Frisky' }
>"
<MvASSIGN
NAME
="
l.petinfo:type
"
VALUE
="
{ 'cat' }
>"
<MvASSIGN
NAME
="
l.ok
"
VALUE
="
{ miva_array_insert(l.pets,l.petinfo,-1) }
>"
<MvASSIGN
NAME
="
l.petinfo:name
"
VALUE
="
{ 'Spot' }
>"
<MvASSIGN
NAME
="
l.petinfo:type
"
VALUE
="
{ 'dog' }
>"
<MvASSIGN
NAME
="
l.ok
"
VALUE
="
{ miva_array_insert(l.petinfo,l.pets,-1) }
>"
<MvASSIGN
NAME
="
l.search
"
VALUE
="
{ 'Frisky,cat' }
>"
Result:
<MvEVAL
EXPR
="
{ miva_array_find(l.search,l.pets,0) }
>"