loParam = Createobject("custom") loParam.Addproperty("aReturnValues[1]", null) loParam.Addproperty("cSample", lcSample) ... loParam.Addproperty("cProcess", lcProcess) DO FORM AddSamp WITH loParam lnNoSelected = ALEN(loParam.aReturnValues) ... ... * AddSamp Init LPARAMETERS toParamObj This.oParamObj = toParamObj && save to form property for use in the form * Somewhere in the form's method ... arrayIndex = 1 DIMENSION Thisform.oParamObj.aReturnValues[nNoSelected] FOR i = 1 TO thisform.samplist.ListCount IF thisform.sampList.Selected(i) Thisform.oParamObj.aReturnValues[arrayIndex ] = ; alltrim(str(thisform.CancelOk)) + "|" + ; alltrim(thisform.samplist.List(i)) + "|" + ; alltrim(str(thisform.lnReps)) + "|" + ; alltrim(str(thisform.lnPackages)) arrayIndex = arrayIndex + 1 ENDIF ENDFOR ... * AddSamp Destroy Thisform.oParamObj = Null && Release reference to the parameter objectIn the second case run form using NAME clause
do form AddSamp with lcSample, lnReps, lnPackages, 3, lcProcess NAME loAddSamp LINKED ? loAddSam.aReturnValues[1] ... loAddSam.Release()>>You can return values this way from the Init only because parameters as