Hello Everyone, I have a healthshare web application with production, _**I try to make a field in basic setting of business service, and I would like to set a string to DISPLAYLIST and VALUELIST of that Property (string maked by query to sql table)**_. I code the same here but it's syntax incorrect in DISPLAYLIST = GetTypeDisplay(), VALUELIST = GetTypeValue(). Someone know a best way to solved my problem? Thanks so much!
Class Demo.RegDataService Extends Ens.BusinessService { Property xmlTagName As %String(DISPLAYLIST = ",EDocument", VALUELIST = ",Demo.EDocument"); Property PrdType As %String(DISPLAYLIST = GetTypeDisplay(), VALUELIST = GetTypeValue()); Parameter SETTINGS = "PrdType:Basic"; Parameter ADAPTER = "EnsLib.File.InboundAdapter"; ClassMethod GetTypeDisplay() As %String { s result = "" &sql(declare CC1 cursor for SELECT TypeName INTO :typename FROM Demo_Data.PrdType) &sql(open CC1) &sql(fetch CC1) while(SQLCODE=0) { s result = result_","_typename &sql(fetch CC1) } &sql(close CC1) q result } ClassMethod GetTypeValue() As %String { s result = "" &sql(declare CC2 cursor for SELECT TypeId INTO :typeid FROM Demo_Data.PrdType) &sql(open CC2) &sql(fetch CC2) while(SQLCODE=0) { s result = result_","_typeid &sql(fetch CC2) } &sql(close CC2) q result }