Martin Browne · Feb 3, 2021

Extracting last value in a repeating field


I have a PV1 repeating field that can contain multiple or a single value. I'd like to always pull the last value in the field but am not sure how to configure this in my DTL.

The repeating field is in PV1:50().1

Could somebody shed some light on this?








Product version: Ensemble 2017.1
0 230
Discussion (5)2
Log in or sign up to continue

Thanks, I did try this but was receiving errors. This was the syntax I was using in the DTL:


This is the full PV1 segment:

PV1|1|O|NPID15T^MEDIFREN^^^^^^^NURSE LED "TB" TELEPHONE CLINIC|||||||||||||||1|015728690002||||||||||||||||||||||||||20210203114600|||||15081942~15081951~15108961~15280550

Assuming CacheBasic supports an asterisk as per ObjectScript (it is not mentioned in that documentation), I think it should be in the 'From' field not the 'To' field, i.e. one less comma before *.


I managed to get this to work thanks to a call to the WRC. Here is the DTL setting I required in case anyone else has similar issues...