So I have a BarcodeScannerInput field in Perspective. it gets some data similar to this ["testValue1", "testValue2", "testValue3"]
I then also have an expression where I want to fetch the very last (most recent) element.
{../BarcodeScannerInput.props.data}[0] This works to get the first element however replacing [0] with [-1] does not return the last element and just remains as null
Is there any way to get the last value from a collection?
This is what I ended up using! Is there any where to make suggestions for expression language to support -1 indexing? I think it would be a very nice language especially since Ignition also uses Python for scripting
As mentioned in Phil's linked thread, we already have a plan to add negative indexing to known-to-be-ordered collection types. No timeline on implementation, though.