liu bo · Apr 11, 2024 go to post

you can generater sql by classdefinition,  to get parameter maxlen  value such as :

s  maxlen= $g(^oddDEF(ClsName,"a",Peoperty,"P","MAXLEN"))
s  truncate= $g(^oddDEF(ClsName,"a",Peoperty,"P","TRUNCATE"))

i (truncate=1) && ($l(originalVal)>maxlen){

     s originalVal =$e(originalVal,1,maxlen)

}

Maybe it can help you!

liu bo · Apr 11, 2024 go to post

you can use as following:   s clsName = "MyClass"    $System.obj= $System.OBJ.New(clsName)