Published on InterSystems Developer Community (https://community.intersystems.com)

Home > How to access target properties from SQL action in DTL Subtransform

Question
GUSTAVO MARQUES · Mar 3, 2022

How to access target properties from SQL action in DTL Subtransform

Does any one could tell me how can I access the target properties from inside SQL in DTL Subtransform? For example, if I use the following statement:

SELECT ID INTO :target.SetIDPID  FROM firstlook.person WHERE  FirstName = 'Paul' - as said in documentation :

  SELECT Name INTO :target.Name FROM MainFrame.EmployeeRecord WHERE SSN = :source.SSN AND City = :source.Home.City

I get an Error: ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>

But if I pass the value for a variable "SetIDPID" I can use it in a set action without any problem: 

SELECT ID INTO :SetIDPID  FROM firstlook.person WHERE  FirstName = 'Paul'

#Coding Guidelines #InterSystems IRIS
Product version: IRIS 2021.1
$ZV: 2021.1 (Build 215.3U)

Source URL:https://community.intersystems.com/post/how-access-target-properties-sql-action-dtl-subtransform