A client asked us to Export a view to Excel.The view has a few columns and the LotusScript gets some data from another document and then creates the export.
The script uses Evaluate to establish the values/text to export to Excel, using the same formulas that are in the view columns.
Our client only has Notes R5.
Two of the columns use huge formula that work in the R7 and R5 views.
The Evaluate fails in R5 with the message " Operation Failed."
We copied the exact document from R5 to R7 and the export works in R7.
So, it’s not the document and it’s not the views in R5.
What could cause such an error in R5?
Please don’t try to debug the formula - it works in R7, so it’s not the Evaluate according to R7.
formula = |DeathBen := 0; |+_
|TraumaBen := 0; |+_
|NonTPDBen := 0; |+_
|DisabilityBen := 0; |+_
|OtherBen := 0; |+_
|Display := 0; |+_
|REM {Determine the death benefit to use}; |+_
|@If(@Contains(P_Type; “Life Insurance”); @Set(“DeathBen”; @If(@IsNumber(P_Life_Basic_Sum_Ass); P_Life_Basic_Sum_Ass; @TextToNumber(P_Life_Basic_Sum_Ass)));“”); |+_
|@If(@Contains(P_Type; “Whole Of Life”); @Set(“DeathBen”; @If(@IsNumber(P_Wol_Sum_Ass); P_Wol_Sum_Ass; @TextToNumber(P_Wol_Sum_Ass)));“”); |+_
|@If(@Contains(P_Type; “Whole Of Life”); @Set(“DeathBen”; DeathBen + @If(@IsNumber(P_Wol_Add_Death_Ben); P_Wol_Add_Death_Ben; @TextToNumber(P_Wol_Add_Death_Ben)));“”); |+_
|@If(@Contains(P_Type; “Personal Superannuation”:“Allocated Pension”); @Set(“DeathBen”; @If(@IsNumber(P_PS_Death_Ben); P_PS_Death_Ben; @TextToNumber(P_PS_Death_Ben)));“”); |+_
|@If(@Contains(P_Type; “Group Superannuation”); @Set(“DeathBen”; @If(@IsNumber(P_GS_Death_Ben); P_GS_Death_Ben; @TextToNumber(P_GS_Death_Ben)));“”); |+_
|@If(@Contains(P_Type; “Group Life”); @Set(“DeathBen”; @If(@IsNumber(P_GLife_Basic_Sum_Ass); P_GLife_Basic_Sum_Ass; @TextToNumber(P_GLife_Basic_Sum_Ass)));“”); |+_
|@If(@Contains(P_Type; “Group TRAUMA”); @Set(“DeathBen”; @If(@IsNumber(P_GTrauma_Death_Ben); P_GTrauma_Death_Ben; @TextToNumber(P_GTrauma_Death_Ben)));“”); |+_
|@If(@Contains(P_Type; “Trauma”); @Set(“DeathBen”; @If(@IsNumber(P_Trauma_Death_Ben); P_Trauma_Death_Ben; @TextToNumber(P_Trauma_Death_Ben)));“”); |+_
|REM {Determine the Trauma Benefit to use}; |+_
|@If(@Contains(P_Type; “Trauma”); @Set(“TraumaBen”; @If(@IsNumber(P_Trauma_Sum_Ass); P_Trauma_Sum_Ass; @TextToNumber(P_Trauma_Sum_Ass)));“”); |+_
|@If(@Contains(P_Type; “Life Insurance”); @Set(“TraumaBen”; @If(@IsNumber(P_Life_Trauma_Ben); P_Life_Trauma_Ben; @TextToNumber(P_Life_Trauma_Ben)));“”); |+_
|@If(@Contains(P_Type; “Group TRAUMA”); @Set(“TraumaBen”; @If(@IsNumber(P_Trauma_Sum_Ass_1_1); P_Trauma_Sum_Ass_1_1; @TextToNumber(P_Trauma_Sum_Ass_1_1)));“”); |+_
|@If(@Contains(P_Type; “Stand Alone TRAUMA”); @Set(“TraumaBen”; @If(@IsNumber(P_Trauma_Sum_Ass_1); P_Trauma_Sum_Ass_1; @TextToNumber(P_Trauma_Sum_Ass_1)));“”); |+_
|@If(@Contains(P_Type; “Group Life”); @Set(“TraumaBen”; @If(@IsNumber(P_GLife_TPD_Trauma_Benefit); P_GLife_TPD_Trauma_Benefit; @TextToNumber(P_GLife_TPD_Trauma_Benefit)));“”); |+_
|@If(@Contains(P_Type; “Whole Of Life”); @Set(“TraumaBen”; @If(@IsNumber(P_Wol_Trauma_Ben); P_Wol_Trauma_Ben; @TextToNumber(P_Wol_Trauma_Ben)));“”); |+_
|REM {Determine the T&PD Disability Benefits to use}; |+_
|@If(@Contains(P_Type; “Life Insurance”); @Set(“DisabilityBen”; @If(@IsNumber(P_Ins_TPD_Benefit); P_Ins_TPD_Benefit; @TextToNumber(P_Ins_TPD_Benefit)));“”); |+_
|@If(@Contains(P_Type; “Trauma”); @Set(“DisabilityBen”; @If(@IsNumber(P_Trauma_TPD_Ben); P_Trauma_TPD_Ben; @TextToNumber(P_Trauma_TPD_Ben)));“”); |+_
|@If(@Contains(P_Type; “Group TRAUMA”); @Set(“DisabilityBen”; @If(@IsNumber(P_GTrauma_TPD_Ben); P_GTrauma_TPD_Ben; @TextToNumber(P_GTrauma_TPD_Ben)));“”); |+_
|@If(@Contains(P_Type; “Whole Of Life”); @Set(“DisabilityBen”; @If(@IsNumber(P_Wol_TPD_Ben); P_Wol_TPD_Ben; @TextToNumber(P_Wol_TPD_Ben)));“”); |+_
|@If(@Contains(P_Type; “Group Life”); @Set(“DisabilityBen”; @If(@IsNumber(P_GLife_TPD_Benefit); P_GLife_TPD_Benefit; @TextToNumber(P_GLife_TPD_Benefit)));“”); |+_
|@If(@Contains(P_Type; “Personal Superannuation”:“Allocated Pension”); @Set(“DisabilityBen”; @If(@IsNumber(P_PS_TPD_Ben); P_PS_TPD_Ben; @TextToNumber(P_PS_TPD_Ben)));“”); |+_
|@If(@Contains(P_Type; “Group Superannuation”); @Set(“DisabilityBen”; @If(@IsNumber(P_GS_TPD_Ben); P_GS_TPD_Ben; @TextToNumber(P_GS_TPD_Ben)));“”); |+_
|REM {Add up the NON TPD disability types}; |+_
|@If(@Contains(P_Type; “Disability Insurance”); @Set(“NonTPDBen”; @If(@IsNumber(P_Dis_Ben_Amount); P_Dis_Ben_Amount; @TextToNumber(P_Dis_Ben_Amount)));“”); |+_
|@If(@Contains(P_Type; “Business Expenses”); @Set(“NonTPDBen”; @If(@IsNumber(P_BE_Ben_Amount); P_BE_Ben_Amount; @TextToNumber(P_BE_Ben_Amount)));“”); |+_
|REM {Add up all of the possible Other Benefits}; |+_
|@If(@Contains(P_Type; “Annuity”); @Set(“OtherBen”; @If(@IsNumber(P_Anu_IPCP); P_Anu_IPCP; @TextToNumber(P_Anu_IPCP)));“”); |+_
|@If(@Contains(P_Type; “Group Salary Continuance”); @Set(“OtherBen”; @If(@IsNumber(P_GSC_Ben_Amount); P_GSC_Ben_Amount; @TextToNumber(P_GSC_Ben_Amount)));“”); |+_
|REM {Add ALL the sums assured together}; |+_
|SATotal := @If(DeathBen = “”; 0; @If(@IsNumber(DeathBen); DeathBen; @TextToNumber(DeathBen))); |+_
|@If(TraumaBen = “”; “”; @Set(“SATotal”; SATotal + (@If(@IsNumber(TraumaBen); TraumaBen; @TextToNumber(TraumaBen))))); |+_
|@If(DisabilityBen = “”; “”; @Set(“SATotal”; SATotal + (@If(@IsNumber(DisabilityBen); DisabilityBen; @TextToNumber(DisabilityBen))))); |+_
|@If(NonTPDBen = “”; “”; @Set(“SATotal”; SATotal + (@If(@IsNumber(NonTPDBen); NonTPDBen; @TextToNumber(NonTPDBen))))); |+_
|@If(OtherBen = “”; “”; @Set(“SATotal”; SATotal + (@If(@IsNumber(OtherBen); OtherBen; @TextToNumber(OtherBen))))); |+_
|REM {Set up the display line(s)}; |+_
|@If(SATotal = “”;@Set(“Display”; 0);@Set(“Display”; @TextToNumber(@Text(SATotal;“F0,”)))); |+_
|@If(DeathBen = “”; “”; @If(DeathBen > 0;@Set(“Display”; Display : @TextToNumber(@Text(DeathBen;“F0,”)));“”)); |+_
|@If(DisabilityBen = “”; “”; @If(DisabilityBen > 0;@Set(“Display”; Display : @TextToNumber(@Text(DisabilityBen;“F0,”)));“”)); |+_
|@If(NonTPDBen = “”; “”; @If(NonTPDBen > 0;@Set(“Display”; Display : @TextToNumber(@Text(NonTPDBen;“F0,”)));“”)); |+_
|@If(TraumaBen = “”; “”; @If(TraumaBen > 0;@Set(“Display”; Display : @TextToNumber(@Text(TraumaBen;“F0,”)));“”)); |+_
|@If(OtherBen = “”; “”; @If(OtherBen > 0;@Set(“Display”; Display : @TextToNumber(@Text(OtherBen;“F0,”)));“”)); |+_
|Display |
result = Evaluate(formula,docchild)