I have a field with data like (whm,lkh,jpm,ypm,lpm) length not predictable but would like to get hold of the last text in this case lpm
define variable i as integer no-undo.
define variable lastentry as character no-undo.
i = num-entries(datastring, ",").
lastentry = entry(i,datastring).
Of course this will only work if your string of data is delimited by some value. Such as a comma in this example.