• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

I need to Calculate the Federal Poverty Level Percentage

New Here ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

The two imput boxes are monthly income and # of people. I need to muliply the monthly income by 12 to get the annual. Then i need to take the (number of people - 1) * 5500+15650. Then it needs to divide the annual number/the second equation. Then it needs to be turned into a percentage.

 

TOPICS
How to , PDF forms

Views

142

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
2 ACCEPTED SOLUTIONS
Community Expert ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

Format the field where the solution will appear as a percentage, then enter the following custom calculation script in it:

 

 

var income=this.getField("monthly income").value;
var numpeople=this.getField("# of people").value;
if(!income || !numpeople)
{event.value=""}
else
{
event.value=income*12/((numpeople-1)*5500+156540);
}

 

 

 

View solution in original post

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2025 Jan 30, 2025

Copy link to clipboard

Copied

Your field name is monthy income (no L) but the script says monthly income.  Ether change the script to say monthy or change the field name to say monthly.

View solution in original post

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

Format the field where the solution will appear as a percentage, then enter the following custom calculation script in it:

 

 

var income=this.getField("monthly income").value;
var numpeople=this.getField("# of people").value;
if(!income || !numpeople)
{event.value=""}
else
{
event.value=income*12/((numpeople-1)*5500+156540);
}

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

it is giving me syntaxerror: unterminated string literal

2: at line 3

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

Typo.  Script corrected.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

It went through but when i type numbers in the monthly income and # of people it doesn't do anything.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

Can you upload your form?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 30, 2025 Jan 30, 2025

Copy link to clipboard

Copied

Here is the form I am trying to make work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2025 Jan 30, 2025

Copy link to clipboard

Copied

Your field name is monthy income (no L) but the script says monthly income.  Ether change the script to say monthy or change the field name to say monthly.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 30, 2025 Jan 30, 2025

Copy link to clipboard

Copied

LATEST

Thank you, of course it was because I didn't spell it right.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2025 Jan 30, 2025

Copy link to clipboard

Copied

Look at the Javascript console (ctrl-j).

Use the correct field names.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 29, 2025 Jan 29, 2025

Copy link to clipboard

Copied

Are "monthly income" and "# of people" your actual field names?

If not, you need to change them in script to your actual field names.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines