IF TYPE("loMyObject." + cNewProperty) = "U" ADDPROPERTY(loMyObject,cNewProperty,"Test Value") ENDIFIf you know the name of the property and it's not a variable you can also use VARTYPE() for better performance yet:
IF TYPE(loObject.cProperty) = "U" ADDPROPERTY(loMyObject,"cProperty","Test Value") ENDIFI suspect either of these will be faster faster than either PEMSTAUS and certainly AMEMBERS.
> AMEMBERS( m.laPropertySet, m.loMyObject ) > IF ASCAN(m.laPropertySet,[cNewProperty],1,0,1,1)>0 && Case insensitive search, 0-not found > ADDPROPERTY( m.loMyObject, [cNewProperty], [Test Information]) > ENDIF > > && or should I do this instead: > > IF PEMSTATUS( m.loMyObject, [cNewProperty], 5) > ADDPROPERTY( m.loMyObject, [cNewProperty], [Test Information]) > ENDIF >>