Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a script statement
.. match('dx',table_field1) where table_field1 contains string 'da;dx;dz'.
Result should be 2 as dx is second element in string compared to 'dx'.
How do I have to transform table_field1 so that I am getting correct result 2?
I tried something like .
match('dx',chr(39) & replace(table_field1,';',chr(39) & ',' & chr(39)) & chr(39))
but this does not work.
Thx - Marcel
Hi
This works:
=match('dx', $(=chr(39) & Replace(table_field1, ';', chr(39) & ',' & chr(39)) & chr(39)))
(as long as there is only one possible value of table_field1 (at the calculation point))
HTH
Jonathan
Hi Jonathan
i tried this to. It works in a diagram, but not in Script!
In Script, I am getting error
Error in expression:
Match takes at least 2 parameters
Thx - Marcel
Hi
I guess I found a solution, I switch the match parameters, use substringcount and index instead:
SUBSTRINGCOUNT(MID(table_field1,1,INDEX(';'&table_field1&';' , ';'&'dx'&';')), ';') + 1
Marcel