Pregunta

I have looked at the documentation for UniObjects for Java and VB and do not see a way to search a UniDynArray without resorting to a loop.

Is that the intention you think to rely on the API language (i.e. Java)?

This is what I ended up doing in VBScript.

If InStr(daShipAlones.TextValue, sDocNum) = 0 Then 
    ....
End If
¿Fue útil?

Solución

I agree with your findings that there is no "UniObjects" way to search through a UniDynArray.

You can search without resulting to a loop (and in one line) by converting the UniDynArray to a string array and then using the language's IndexOf equivalent to retrieve the location of you search term. In C#/VB this can be done like so:

Array.IndexOf(myUniDynArray.StringValue.Split(UniConstants.FieldMarker), "searchterm")

Where UniConstants.FieldMarker is essentially an alias for (char)254

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top