Extract() template command does not work if pipe | character is in %symbol

I had a value in the %FieldUserOptions that was a pipe delimted value.
ValueTips(Unpaid Invoice|Paid Invoice|Cancelled Invoice)

executed this in my template. This command should return then contents of ValueTips between the ().
However, it returns an empty string.

Changing %FieldUserOptions to this value corrects the problem.
ValueTips(Unpaid Invoice,Paid Invoice,Cancelled Invoice)

This is definitely related to the | pipe character. User semi-colons also works.
ValueTips(Unpaid Invoice;Paid Invoice;Cancelled Invoice)

It occurred to me I have mainly used EXTRACT() with %WindowStatement and %ControlStatement. They come from the [WINDOW] that can be multi-line with a Pipe line continuation. Extract must assume all Pipes are for line continuation.

#FOR(%Control),WHERE(%ControlType='RADIO' AND %ControlParent=%lOptionControl)
    #IF(NOT %lRadioValue)

%ControlStatement The control’s declaration statement (and all attributes). This may contain multiple lines of code if the declaration is too long to fit on a single line.

A possible fix would be to only do that if there’s a 13,10. I would like to see EXTRACT() added to the language, QUOTE / UNQUOTE started as template commands.

1 Like