You can only read into simple local variables, so it should be like:
set Name=##class(Example.Team1).%New()
read "enter your name :", NameStr
set Name.EmpName = NameStrThere are also utility prompt methods, see %Library.Prompt class. For example GetString method supports object properties:
set Name=##class(Example.Team1).%New()
do ##class(%Library.Prompt).GetString("enter your name", Name.EmpName)- Log in to post comments
