Question
Glenda Anaya · Dec 19, 2019

Insert KeyName, DataValue in existing Lookup.Table via DTL transformation

Hi,

Is there a way to insert new Key/Value in an existing  lookup Table via a DTL code?  The only thing I found in the documentation is that we could use the following command SELECT KeyName,DataValue FROM Ens_Util.LookupTable WHERE TableName = 'myTab'. In the meantime I just created a table and  used it in my DTL to insert new values and validate if the Key exist.

 

Regards

 


 

 

0
0 300
Discussion (1)1
Log in or sign up to continue

You can use ClassMethod ##class(Ens.Util.Lookup).UpdateValue(pTableName As %String = "", pKeyName As %String = "", pNewValue As %String = "", pCreate As %Boolean = 1)

This will update the value of an existing entry with the supplied TableName and KeyName. If pCreate is true, then the entry will be created if it doesn't already exist