Thread: [Solved] IF Statement not working
View Single Post
 
Old 02-25-2020, 10:26 AM
shawn.low@cox.net shawn.low@cox.net is offline Windows 10 Office 2016
Novice
 
Join Date: May 2019
Location: Aliso Viejo, CA.
Posts: 24
shawn.low@cox.net is on a distinguished road
Default IF Statement not working

Good Morning,

I wanted to ask if someone could please review this and see where i was going wrong. Apologies for the length of this.

I have a Word Doc that needs to build "Dynamically". There is a section currently that is working properly. The code looks like this:

Late Charge: {IF {Mergefield Opportunity_Borrower_Type\*Mergeformat} = "Refinance" "If a payment is late by more then 15 days, you shall be subject to a late fee of $15.00." {IF {Mergefield Opportunity_State\*Mergeformat} = "SC" "If the payment is 15 days late, you will be charged $18.00 or 5% of the unpaid payment amount (A minimum of $7.20 and a maximum of $18.00)." {IF {Mergefield Opportunity_State\* Mergeformat} = "NM" "If a payment is 15 days late, you will be charged the lesser of $10.00 or 5% of the unpaid payment amount." {IF {Mergefield Opportunity_State\*Mergeformat} = "TX" "If a payment is late by more than 10 days, you may be charged the greater of 5% of the delinquent installment amount or $7.50." "If a payment is late by more than 15 days, you shall be subject to a late fee of $15.00."}}}}

I have been asked to have this section of the document only populate, if the loan is a "Bi-Weekly" loan. There is a picklist I can reference for this.
I adjusted the formula to look like this (the part I added is in Bold.

{IF {Mergefield TableStart:BorrowerProductQuery \*Mergeformat}{Mergefield Selected_Product_Frequency \* Mergeformat}{Mergefield TableEnd:BorrowerProductQuery \* Mergeformat} = "Bi-Weekly" "" "Late Charge:{IF {Mergefield Opportunity_Borrower_Type\*Mergeformat} =
"Refinance" "If a payment is late by more then 15 days, you shall be subject to a late fee of $15.00." {IF {Mergefield Opportunity_State\*Mergeformat} = "SC" "If the payment is 15 days late, you will be charged $18.00 or 5% of the unpaid payment amount (A minimum of $7.20 and a maximum of $18.00)." {IF {Mergefield Opportunity_State\* Mergeformat} = "NM" "If a payment is 15 days late, you will be charged the lesser of $10.00 or 5% of the unpaid payment amount." {IF {Mergefield Opportunity_State\*Mergeformat} = "TX" "If a payment is late by more than 10 days, you may be charged the greater of 5% of the delinquent installment amount or $7.50." "If a payment is late by more than 15 days, you shall be subject to a late fee of $15.00."}}}}}

So basically, if the field "Frequency" is "Bi-Weekly" the entire "Late Charge" section should not populate. If the field is anything else, the paragraph needs to be there.
The "TableStart" & "TableEnd" Mergefields are because we are using Conga Composer, and I have to reference a Conga Query for the value in a field called "Frequency".

When I run the Conga Solution, the document fails to generate. So something in the added code is causing it to fail. If I take out the added code, the document generates.


Thank you,
Shawn

Last edited by macropod; 02-26-2020 at 03:02 AM. Reason: Stripped out unhelpful font formatting
Reply With Quote