I tried this, however, it appears that @newvar is not being used as the group iteration. Its copying to group (0) every time. If I hardcode 3 into @mynewvar, it still only copies the UOM to the (0) group OBX.
Code:
{ { OP IF }
{ ERR 0 }
{ COND { 1(0).1(0).1(%g1).OBX.00572.[0] == =3} }
{ THENBODY {
{ { OP SUB }
{ ERR 0 }
{ IN {{$%g1} =2} }
{ OUT @mynewvar }
{ FUNCTION SUB }
}
{ { OP COPY }
{ ERR 0 }
{ PRE {
set #xlateOutVals [string range [lindex $xlateInVals 0] 6 end]
}}
{ IN {{1(0).1(0).1(%g1).OBX.00573(0).[0]}} }
{ OUT {{1(0).1(0).1($@mynewvar).OBX.00574}} }
}
{ { OP COPY }
{ ERR 0 }
{ PRE {
echo $xlateInVals
}}
}}
{ ELSEBODY {
}}
Thanks James! That worked. I didn’t know you could create an iteration variable on the fly like that. I’ll have to file this away in my Cloverleaf secrets, tips and tricks folder. 😀
Author
Replies
Viewing 2 reply threads
The forum ‘Cloverleaf’ is closed to new topics and replies.