;;Example for Altering UDF Aggregate Collection ;;1) General Form- for Alteration [Report:General UDF Aggre Alter Report] Form: General UDF Aggre Alter Form Object: Company : ##Svcurrentcompany Variable:RCPGUALRepTitleVAR;;Variable to be Set Report Tittle of the Report of Actual Alteration Form Variable:RCPGUALFunctionVAR;; Variable to be Set Function in the Report of Actual Alteration Form Variable:RCPCollectionforFunction;;Variable to set Collection Name in the Report of Actual Alteration Form [Form:General UDF Aggre Alter Form] Use: Master Accounting Form Delete: Parts Add: Parts: General UDF Aggre Alter Part Add : On : At End : Form Accept : Yes :Call: RCPGUALFunction [Part:General UDF Aggre Alter Part] Line:General UDF Aggre Alter Line [Line:General UDF Aggre Alter Line] Fields:Simple Prompt Local:Field:Simple Prompt:Set as:$$String:##RCPGUALRepTitleVAR ;;------------------VAriable Declaration-------------- ;;------------------------Global Variable---------------- [Variable:RCPCollectionforFunction] Type:String [Variable:RCPGUALFunctionVAR] Type:String [Variable:RCPGUALRepTitleVAR] Type:String [Variable:RCPCountColl] Type:String [Variable:ColIndxNo] Type:String [System:Variable] RCPGUALFunctionVAR:"" RCPGUALRepTitleVAR:"" RCPCollectionforFunction:"" RCPCountColl:"" ;;------------------------General Function---------------- [Function:RCPGUALFunction] IF01:if:Not $$Isempty:##RCPGUALFunctionVAR IF02:If:Not $$IsEmpty:##RCPCollectionforFunction 010:Set:RCPCountColl$$NumItems$$sTRING:##RCPCollectionforFunction)) Action:A01o If:##RCPCountColl>0:Set:ColIndxNo:##RCPCountColl+1 Action:A02o If:##RCPCountColl<=0:Set:ColIndxNo:1 Action:A03:Call:##RCPGUALFunctionVAR 020:End if 025:End If 030:Return ;;2) A Sepcific Form for Altertation of UDF [Report:Specific UDF Aggre Alter Report] Use:General UDF Aggre Alter Report Variable:XYZVar;;Depends on Number of Fields in the orginal Aggregate UDF Report, Here only 2 (A and B) for example VariableQRVar;;Depends on Number of Fields in the orginal Aggregate UDF Report, Here only 2 (A and B) for example Set:RCPGUALFunctionVAR:$$String:"Specific UDF Aggre Function";; Should be same as function name Set:RCPGUALRepTitleVAR:$$LocaleString:"Specific UDF Aggre Alter Form" ;; can give any desired name Set:RCPCollectionforFunction:$$String:"SpecificUDFAggreOrginalCollection";; Here we need to put the orginal collection name, make sure than collection fetch all required data Local:Form:General UDF Aggre Alter Form:Addarts:After:General UDF Aggre Alter Part:Specific UDF Aggre Alter Part [Part:Specific UDF Aggre Alter Part] Lines:Specific UDF Aggre Alter Line1, Specific UDF Aggre Alter Line2 [Line:Specific UDF Aggre Alter Line1] Fields:Simple Prompt, Short Name field Local:Field:Simple Prompt:Info:"Specific UDF Aggre Fld 1" Local:Field:Short Name field:Modifies:XYZVar:Yes [Line:Specific UDF Aggre Alter Line2] Fields:Simple Prompt, Short Name field Local:Field:Simple Prompt:Info:"Specific UDF Aggre Fld 2" Local:Field:Short Name field:ModifiesQRVar:Yes [Function:Specific UDF Aggre Function] 000:Modify ObjectCompany,##SVCurrentCompany).SpecificUDFAggreOrginalCollection[##ColIndxNo].XYZ[1].XYZ:##XYZVar 010:Modify ObjectCompany,##SVCurrentCompany).SpecificUDFAggreOrginalCollection[##ColIndxNo].PQR[1].PQR:##PQRVar [Collection:SpecificUDFAggreOrginalCollection] Type:SpecificUDFAggreOrginal:Company Child Of:##SVCUrrentCompany Fetch:XYZ,PQR