Lotus Notes Formula Errror Invalid formula format

25 pts.
Tags:
Lotus Notes
Lotus Notes Formula Error
Hi All !!! Please Help! I have written one program which runs after clicking on button i.e. in lotus notes formula language. it is also working fine. Now I want to make some modifications in that program but when I change something it gives error while checking formula by clicking on /. I am sure that coding is correct even I removed some spaces blank lines then it gives error else program is running fine. but I want to make some modification and that is necessary for me. I tried so many time by inserting some blank lines removing some spaces some time it accepts changes but after saving some code in that program disappears? please can any body help me how to come out from this problem ? My code is about 20 pages (A4 size). I want to add only one more condition Following is the code: server :=@Subset(@DbName;1); travDb:="travel.nsf"; purDb:="purchase.nsf"; planDb:="planning.nsf"; fa:="VJ.nsf"; formName:=@RightBack(@Left(FA_FormName;"?");"/"); @SetField("FA_Error";""); PUR_Project_Code:=@Trim(FA_ProjectNo); @If( formName="FAAMC"; @If( @IsNotMember(PUR_Project_Code;@DbColumn("":"NOCache";server:"vj.nsf";"AMCP";1)); @Do( @SetField("FA_Error";"You can't put AMC under "+PUR_Project_Code+" please select the project from the available list again"); @SetField("FA_Continue";"No") ; @Return("") ); "" ); "" ); useImpact:=@DbLookup("":"nocache";server: planDb;"USEIMPACT";"FUNDING";"useImpact"); @If(useImpact="No"; @Do( viewTRF:="VJTRACOMNOIMP"; viewTRFLR:="VJTRACOMLRNOIMP" ); @Do( viewTRF:="VJTRACOM"; viewTRFLR:="VJTRACOMLR" ) ); PUR_Project_Code:=@Trim(FA_ProjectNo); projectClass:=@If(@IsError(@DbLookup("":"NoCache" ; "" : "" ; "FAPT" ; @Left(FA_ProjectNo;3);3)) ; "NOTHING"; @DbLookup("":"NoCache";"":"";"FAPT";@Left(FA_ProjectNo;3);3)); @SetField("f1";projectClass+" "+PUR_Project_Code+FA_MajorHead); @SetField("FundHead";FA_MajorHead+" ["+FA_ProjectNo+">"); @SetField("SanCSIR"; 0 ); @SetField("SanLR"; 0 ); @SetField("ComCSIR"; 0 ); @SetField("ComLR"; 0 ); @SetField("ExpCSIR"; 0 ); @SetField("ExpLR"; 0 ); @If( @Trim(projectClass)="INH"; @Do( @If( FA_MajorHead="Travel" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 2)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 2)) ); FA_MajorHead="Contingency" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 6)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 6)) ); FA_MajorHead="Maintenance" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 11)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 11)) ); FA_MajorHead="Consummable" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 3)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 3)) ); FA_MajorHead="Works & Services" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 12)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 12)) ); FA_MajorHead="Equipment" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 4)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 4)) ); FA_MajorHead="Computer Equipment"; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 7)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 7)) ); FA_MajorHead="Workshop m/c" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 17)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 17)) ); FA_MajorHead="Office Equipment" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;14)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;14)) ); FA_MajorHead="Furniture"; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;8)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;8)) ); FA_MajorHead="Library"; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;18)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;18)) ); FA_MajorHead="Models & Exhibits"; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;19)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;19)) ); FA_MajorHead="Vehicles" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;13)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;13)) ); FA_MajorHead="Tools & Plants" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;20)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;20)) ); FA_MajorHead="Lan/Wan" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;"LAN")); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;"LAN")) ); FA_MajorHead="Major Software" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;"SOFTWARE")); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;"SOFTWARE")) ); FA_MajorHead="Library Journals" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;"LIBJRN")); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;"LIBJRN")) ); FA_MajorHead="Ship Cost" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 44)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 44)) ); FA_MajorHead="Maintenance of Equipment/Computer" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 45)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 45)) ); @SetField("SanCSIR";0) ); @If( FA_MajorHead="Travel" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 24)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 24)) ); FA_MajorHead="Contingency" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 25)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 25)) ); FA_MajorHead="Maintenance" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 32)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 32)) ); FA_MajorHead="Consummable" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 26)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 26)) ); FA_MajorHead="Ship Cost" ; @SetField("SanLR"; 0); FA_MajorHead="Maintenance of Equipment/Computer" ; @SetField("SanLR"; 0); FA_MajorHead="Works & Services" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 33)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 33)) ); FA_MajorHead="Equipment" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 27)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 27)) ); FA_MajorHead="Computer Equipment" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 28)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 28)) ); FA_MajorHead="Workshop m/c" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 38)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 38)) ); FA_MajorHead="Office Equipment" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;35)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;35)) ); FA_MajorHead="Furniture" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;29)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;29)) ); FA_MajorHead="Library" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;39)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;39)) ); FA_MajorHead="Models & Exhibits" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;40)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;40)) ); FA_MajorHead="Vehicles" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;34)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;34)) ); FA_MajorHead="Tools & Plants" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;41)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;41)) ); FA_MajorHead="Lan/Wan" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;"LAN_LR")); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;"LAN_LR")) ); FA_MajorHead="Major Software" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION";PUR_Project_Code;"SOFTWARE_LR")); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;"SOFTWARE_LR")) ); FA_MajorHead="Library Journals" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION";PUR_Project_Code;"LIBJRN_LR")); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;"LIBJRN_LR")) ); @SetField("SanLR";0) ); @If( FA_MajorHead="Travel" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";"": travDb ;viewTRF;PUR_Project_Code;6))); 0; @Sum(@DbLookup("":"NoCache";"":travDb;viewTRF;PUR_Project_Code;6))/100000)+ @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Travel";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Travel";4))/100000) ); FA_MajorHead="Contingency" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Contingency";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Contingency";4))/100000) ); FA_MajorHead="Maintenance" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Maintenance";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Maintenance";4)))/100000 ); FA_MajorHead="Consummable" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Consummable";4))); 5; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Consummable";4)))/100000 ); FA_MajorHead="Ship Cost" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Ship Cost";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Ship Cost";4)))/100000 ); FA_MajorHead="Maintenance of Equipment/Computer" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Maintenance of Equipment/Computer";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Maintenance of Equipment/Computer";4)))/100000 ); FA_MajorHead="Works & Services" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Works & Services";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Works & Services";4)))/100000 ); FA_MajorHead="Equipment" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Equipment";4)))/100000 ); FA_MajorHead="Computer Equipment" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Computer Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Computer Equipment";4)))/100000 ); FA_MajorHead="Workshop m/c" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Workshop m/c";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Workshop m/c";4)))/100000 ); FA_MajorHead="Office Equipment" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Office Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Office Equipment";4)))/100000 ); FA_MajorHead="Furniture" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Furniture";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Furniture";4)))/100000 ); FA_MajorHead="Library" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Library";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Library";4)))/100000 ); FA_MajorHead="Models & Exhibits" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Models & Exhibits";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Models & Exhibits";4)))/100000 ); FA_MajorHead="Vehicles" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Vehicles";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Vehicles";4)))/100000 ); FA_MajorHead="Tools & Plants" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Tools & Plants";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Tools & Plants";4)))/100000 ); FA_MajorHead="Lan/Wan" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Lan/Wan";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Lan/Wan";4)))/100000 ); FA_MajorHead="Major Software" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Major Software";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Major Software";4)))/100000 ); FA_MajorHead="Library Journals" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Library Journals";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Library Journals";4)))/100000 ); @SetField("ComCSIR";0) ); @SetField("f1";f1+" -Inside IHN4-"); @If( FA_MajorHead="Travel" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";"": travDb ;viewTRFLR;PUR_Project_Code;6))); 0; @Sum(@DbLookup("":"NoCache";"": travDb ;viewTRFLR;PUR_Project_Code;6))/100000)+ @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Travel";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Travel";4))/100000) ); FA_MajorHead="Contingency" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Contingency";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Contingency";4)))/100000 ); FA_MajorHead="Maintenance" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Maintenance";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Maintenance";4)))/100000 ); FA_MajorHead="Consummable" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Consummable";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Consummable";4)))/100000 ); FA_MajorHead="Ship Cost" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Ship Cost";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Ship Cost";4)))/100000 ); FA_MajorHead="Maintenance of Equipment/Computer" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Maintenance of Equipment/Computer";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Maintenance of Equipment/Computer";4)))/100000 ); FA_MajorHead="Works & Services" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Works & Services";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Works & Services";4)))/100000 ); FA_MajorHead="Equipment" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Equipment";4)))/100000 ); FA_MajorHead="Computer Equipment" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Computer Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Computer Equipment";4)))/100000 ); FA_MajorHead="Workshop m/c" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Workshop m/c";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Workshop m/c";4)))/100000 ); FA_MajorHead="Office Equipment" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Office Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Office Equipment";4)))/100000 ); FA_MajorHead="Furniture" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Furniture";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Furniture";4)))/100000 ); FA_MajorHead="Library" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Library";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Library";4)))/100000 ); FA_MajorHead="Models & Exhibits" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Models & Exhibits";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Models & Exhibits";4)))/100000 ); FA_MajorHead="Vehicles" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Vehicles";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Vehicles";4)))/100000 ); FA_MajorHead="Tools & Plants" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Tools & Plants";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Tools & Plants";4)))/100000 ); FA_MajorHead="Lan/Wan" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Lan/Wan";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Lan/Wan";4)))/100000 ); FA_MajorHead="Major Software" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Major Software";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Major Software";4)))/100000 ); FA_MajorHead="Library Journals" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Library Journals";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Library Journals";4)))/100000 ); @SetField("ComLR";0) ); @SetField("f1";f1+" -Inside IHN4-"); @If( FA_MajorHead="Travel" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 2)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 2)) ); FA_MajorHead="Contingency" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 6)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 6)) ); FA_MajorHead="Maintenance" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 11)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 11)) ); FA_MajorHead="Consummable" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 3)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 3)) ); FA_MajorHead="Ship Cost"; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; "SHIPCOSTEXP")); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; "SHIPCOSTEXP")) ); FA_MajorHead="Maintenance of Equipment/Computer" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; "MECEXP")); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; "MECEXP")) ); FA_MajorHead="Works & Services" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 12)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 12)) ); FA_MajorHead="Equipment" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 4)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 4)) ); FA_MajorHead="Computer Equipment" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 7)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 7)) ); FA_MajorHead="Workshop m/c" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;17)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;17)) ); FA_MajorHead="Office Equipment" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;14)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;14)) ); FA_MajorHead="Furniture" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;8)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;8)) ); FA_MajorHead="Library" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;18)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;18)) ); FA_MajorHead="Models & Exhibits" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;19)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;19)) ); FA_MajorHead="Vehicles" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;13)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;13)) ); FA_MajorHead="Tools & Plants" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;20)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;20)) ); FA_MajorHead="Lan/Wan" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;"LANEXP")); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;"LANEXP")) ); FA_MajorHead="Major Software" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;" SOFTWAREEXP")); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;"SOFTWAREEXP")) ); FA_MajorHead="Library Journals" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;" LIBJRNEXP")); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;"LIBJRNEXP")) ); @SetField("ExpCSIR";0) ); @SetField("f1";f1+" -Inside IHN5-"); @If( FA_MajorHead="Travel" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 25)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 25)) ); FA_MajorHead="Contingency" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 28)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 28)) ); FA_MajorHead="Maintenance" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 33)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 33)) ); FA_MajorHead="Consummable" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 26)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 26)) ); FA_MajorHead="Ship Cost" ; @SetField("ExpLR"; 0); FA_MajorHead="Maintenance of Equipment/Computer" ; @SetField("ExpLR"; 0); FA_MajorHead="Works & Services" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 34)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 34)) ); FA_MajorHead="Equipment" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 27)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 27)) ); FA_MajorHead="Computer Equipment" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 29)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 29)) ); FA_MajorHead="Workshop m/c" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;17)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;17)) ); FA_MajorHead="Office Equipment" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;36)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;36)) ); FA_MajorHead="Furniture" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;30)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;30)) ); FA_MajorHead="Library" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;40)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;40)) ); FA_MajorHead="Models & Exhibits" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;41)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;41)) ); FA_MajorHead="Vehicles" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;35)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;35)) ); FA_MajorHead="Tools & Plants" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;42)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;42)) ); FA_MajorHead="Lan/Wan" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;"LANEXP_LR")); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;"LANEXP_LR")) ); FA_MajorHead="Major Software" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;" SOFTWAREEXP_LR")); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;"SOFTWAREEXP_LR")) ); FA_MajorHead="Library Journals" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;"LIBJRNEXP_LR")); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;"LIBJRNEXP_LR")) ); @SetField("ExpLR";0) ) ); projectClass="EXT"; @Do( @SetField("f1";f1+" -Inside EXT1-"); @If( FA_MajorHead="Travel" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 2)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 2)) ); FA_MajorHead="Contingency" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 6)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 6)) ); FA_MajorHead="Wages" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 21)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 21)) ); FA_MajorHead="Consummable" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 3)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 3)) ); FA_MajorHead="External payment" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 43)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 43)) ); FA_MajorHead="Boat Hire" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 22)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 22)) ); FA_MajorHead="Equipment" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 4)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 4)) ); FA_MajorHead="Computer Equipment" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 7)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 7)) ); FA_MajorHead="Capital Items" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;5)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;5)) ); @SetField("SanCSIR";0) ); @SetField("f1";f1+" -Inside EXT2-"); @If( FA_MajorHead="Travel" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 2)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 2)) ); FA_MajorHead="Contingency" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 6)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 6)) ); FA_MajorHead="Wages" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 21)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 21)) ); FA_MajorHead="Consummable" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 3)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 3)) ); FA_MajorHead="External payment" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 23)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 23)) ); FA_MajorHead="Boat Hire" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 22)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 22)) ); FA_MajorHead="Equipment" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 4)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 4)) ); FA_MajorHead="Computer Equipment" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 7)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 7)) ); FA_MajorHead="Capital Items" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;5)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;5)) ); @SetField("ExpCSIR";0) ); @SetField("f1";f1+" -Inside EXT3-"); @If( FA_MajorHead="Travel" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";"":"travel.nsf";viewTRF;PUR_Project_Code;6))); 0; @Sum(@DbLookup("":"NoCache";"":"travel.nsf";viewTRF;PUR_Project_Code;6))/100000)+ @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Travel";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Travel";4))/100000) ); FA_MajorHead="Contingency" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Contingency";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Contingency";4)))/100000 ); FA_MajorHead="Wages" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Wages";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Wages";4)))/100000 ); FA_MajorHead="Consummable" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Consummable";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Consummable";4)))/100000 ); FA_MajorHead="External payment" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"External payment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"External payment";4)))/100000 ); FA_MajorHead="Boat Hire" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Boat Hire";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Boat Hire";4)))/100000 ); FA_MajorHead="Equipment" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Equipment";4)))/100000 ); FA_MajorHead="Computer Equipment" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Computer Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Computer Equipment";4)))/100000 ); FA_MajorHead="Capital Items" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Capital Items";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Capital Items";4)))/100000 ); @SetField("ComCSIR";0) ) ); projectClass="SQP" | projectClass="RFP"; @Do( @SetField("f1";f1+" -Inside SQP1-"); @If( FA_MajorHead="Travel" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 2)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 2)) ); FA_MajorHead="Consummable" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 3)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 3)) ); FA_MajorHead="Contingency" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 6)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 6)) ); FA_MajorHead="Computer Equipment"; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 7)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 7)) ); FA_MajorHead="Staff Qtrs Revenue" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;15)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;15)) ); FA_MajorHead="Staff Qtrs Capital" ; @SetField("SanCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;16)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;16)) ); @SetField("SanCSIR";0) ); @SetField("f1";f1+" -Inside SQP2-"); @If( FA_MajorHead="Travel" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 24)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 24)) ); FA_MajorHead="Consummable" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 26)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 26)) ); FA_MajorHead="Contingency" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code; 25)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code; 25)) ); FA_MajorHead="Staff Qtrs Revenue" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;36)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;36)) ); FA_MajorHead="Staff Qtrs Capital" ; @SetField("SanLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "SANCTION"; PUR_Project_Code;37)); 0; @DbLookup("":"NoCache"; server:planDb; "SANCTION";PUR_Project_Code;37)) ); @SetField("SanLR";0) ); @SetField("f1";f1+" -Inside SQP3-"); @If( FA_MajorHead="Travel" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";"":"travel.nsf";viewTRF;PUR_Project_Code;6))); 0; @Sum(@DbLookup("":"NoCache";"":"travel.nsf";viewTRF;PUR_Project_Code;6))/100000) + @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Travel";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Travel";4))/100000) ); FA_MajorHead="Contingency" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Contingency";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Contingency";4))/100000 ) ); FA_MajorHead="Consummable" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Consummable";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Consummable";4)))/100000 ); FA_MajorHead="Computer Equipment" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Computer Equipment";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Computer Equipment";4)))/100000 ); FA_MajorHead="Staff Qtrs Revenue" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Staff Qtrs Revenue";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Staff Qtrs Revenue";4)))/100000 ); FA_MajorHead="Staff Qtrs Capital" ; @SetField("ComCSIR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Staff Qtrs Capital";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"Staff Qtrs Capital";4)))/100000 ); @SetField("ComCSIR";0) ); @SetField("f1";f1+" -Inside SQP4-"); @If( FA_MajorHead="Travel" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";"":"travel.nsf";viewTRF;PUR_Project_Code;6))); 0; @Sum(@DbLookup("":"NoCache";"":"travel.nsf";viewTRF;PUR_Project_Code;6)))/100000 ); FA_MajorHead="Contingency" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Contingency";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Contingency";4)))/100000 ); FA_MajorHead="Consummable" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Consummable";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Consummable";4)))/100000 ); FA_MajorHead="Staff Qtrs Revenue" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Staff Qtrs Revenue";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Staff Qtrs Revenue";4)))/100000 ); FA_MajorHead="Staff Qtrs Capital" ; @SetField("ComLR"; @If(@IsError(@Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Staff Qtrs Capital";4))); 0; @Sum(@DbLookup("":"NoCache";server:purDb;"VJPURCOM";PUR_Project_Code+"LR Staff Qtrs Capital";4)))/100000 ); @SetField("ComLR";0) ); @SetField("f1";f1+" -Inside SQP4-"); @If( FA_MajorHead="Travel" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 2)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 2)) ); FA_MajorHead="Consummable" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 3)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 3)) ); FA_MajorHead="Contingency" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 6)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 6)) ); FA_MajorHead="Computer Equipment" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 7)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 7)) ); FA_MajorHead="Staff Qtrs Revenue" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;15)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;15)) ); FA_MajorHead="Staff Qtrs Capital" ; @SetField("ExpCSIR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;16)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;16)) ); @SetField("ExpCSIR";0) ); @SetField("f1";f1+" -Inside SQP5-"); @If( FA_MajorHead="Travel" ; @SetField("ExpLR"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 25)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 25)) ); FA_MajorHead="Consummable" ; @SetField("TRF_ConExpenses_1"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 26)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 26)) ); FA_MajorHead="Contingency" ; @SetField("TRF_miscExpenses_1"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code; 28)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code; 28)) ); FA_MajorHead="Staff Qtrs Revenue" ; @SetField("TRF_SQrev_Expenses_1"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;37)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;37)) ); FA_MajorHead="Staff Qtrs Capital" ; @SetField("TRF_SQcap_Expenses_1"; @If (@IsError(@DbLookup("":"NoCache";server:planDb; "EXPENDITURE"; PUR_Project_Code;38)); 0; @DbLookup("":"NoCache"; server:planDb; "EXPENDITURE";PUR_Project_Code;38)) ); @SetField("ExpLR";0) ) ); ""); REM { Set Funds Available }; REM { ================ }; @SetField("AvaCSIR"; SanCSIR-ExpCSIR-ComCSIR ); @SetField("AvaLR"; SanLR-ExpLR-ComLR ); avail:=0; @If(FA_Source="LR" | FA_Source="Lab Reserves/Borne by outside bodies"; avail:=AvaLR; FA_Source="This Project" | FA_Source="External Fund/Borne by outside bodies" | FA_Source="CSIR Grant/Borne by outside bodies" ; avail:=AvaCSIR; "" ); @SetField("FA_Error";""); @If(FA_ProjectNo="Select" | FA_Source="Select" | FA_Source="NONE" | FA_MajorHead="Select" | FA_FormName="NONE"| FA_FormName="Select";""; @Do( @If(avail>0 | FA_Source="Borne by outside bodies" ; @Do( @SetField("FA_Continue";"Yes"); @SetField("FA_Error";"") ); @Do( @SetField("FA_Continue";"No"); @SetField("FA_Error";@Text(avail)+" funds in "+FA_FundSource) ) ) ) )
ASKED: February 10, 2008  7:16 AM
UPDATED: February 12, 2008  7:40 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I don’t know if it is a space issue or coding error but to save some characters and reduce your server load change all of your Lookup’s to one time events sorted to a variable and then do a @If(@IsError(variable) rather than multiple lookups. This way you only do it once, not twice for each If statement.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Mvp4u
    Thanks a lot
    25 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following