Skip to main content
GOLO Grenada
Participating Frequently
November 30, 2020
Answered

I NEED A POP-UP SCREEN TO SHOW RESULTS OF LOAN PAYMENT CALCULATION! If thats possible.

  • November 30, 2020
  • 2 replies
  • 649 views

Good day,

I created a loan monthly payment calculation PDF with the following fields;

- Current year: "_cYear" (a script adds in this value automatically.

- Vehicle year: "_vYear" (this value is entered by the user).

- Vehicle age: "_vAge" (this is calculated my simple script subtracting Current year from Vehicle year).

-Vehicle price: "_vPrice (this value is entered by the user).

- Term: "_term" (this value is the number of monthly payments, its value is selected based on the age of the vehicle using "if/else" function).

- Interest rate: "_iRate" (this value is fixed).

- Downpayment: "_dPayment" (this value is 15% of the Vehicle price).

- Loan Amount: "_lAmount" (this value is the Vehicle price minus the downpayment).

-Monthly payment: "_mPayment" (this value is the result of the formula).

I get the desired results, however, I will like to include a button that will open a pop-up window that shows the following statement;

if the vehicle is 7 years or less in age;

"('_mPayment'/month, '_term' months, No Downpayment - FCIB)"

Or, if the vehicle is 8 years to 10 years in age;

"('_mPayment'/month, '_term' months, '_dPayment' Downpayment - FCIB)"

Or, if the vehicle is 11 years and older in age;

"(This vehicle does NOT qualify for financing)"

Is this possible?

 

K. Gibbs.

 

This topic has been closed for replies.
Correct answer Nesa Nurani

Code for PopUp menu:

var age = this.getField("_vAge").value;
var pay = this.getField("_mPayment").value;
var dpay = this.getField("_dPayment").value;
var term = this.getField("_term").value;
if(age <= 7){
app.alert(pay+"/month, "+term+"months, "+"No Downpayment - FCIB",3);}
else if(age >=8 && age <=10){
app.alert(pay+"/month, "+term+"months, "+dpay+" Downpayment - FCIB",3);}
else if(age >= 11){
app.alert("(This vehicle does NOT qualify for financing)",3);}

2 replies

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
December 1, 2020

Code for PopUp menu:

var age = this.getField("_vAge").value;
var pay = this.getField("_mPayment").value;
var dpay = this.getField("_dPayment").value;
var term = this.getField("_term").value;
if(age <= 7){
app.alert(pay+"/month, "+term+"months, "+"No Downpayment - FCIB",3);}
else if(age >=8 && age <=10){
app.alert(pay+"/month, "+term+"months, "+dpay+" Downpayment - FCIB",3);}
else if(age >= 11){
app.alert("(This vehicle does NOT qualify for financing)",3);}
GOLO Grenada
Participating Frequently
December 1, 2020

Perfect!
Worked like a charm.

Much thanks Nesa!