Skip to Content
0
Aug 09, 2016 at 02:00 PM

Dynamic syntax - how to add text and other value?

239 Views

Hi. I try to add text to my dynamic syntax.

For example I want to use formatted search in Sales Order document in Ref field to have Customer number + text + Document number ("C00001 text 45/2016").

I can make query to get customer number: SELECT $[$4.0.0]

But i have syntax error, when i try to add text: SELECT $[$4.0.0] + 'text' (i also tried || ).

When I'm using query like this: SELECT T0.[CardCode] + '-' + CAST(T0.[DocNum] AS VARCHAR) FROM ORDR T0

there are no errors, but when I add document, the values for first customer and document are taken, not for selected customer and I must look for correct value under magnificant glass.

How can I add text and other values to dynamic syntax for current document?