Highlighted

If functions

New Here ,
Oct 09, 2020

Copy link to clipboard

Copied

Hi, im just a newbie in this and hoping someone can help me.

How to add a rule or what script could do,

1. if i enter a value in amount column currency feild will be automatically populated with default currency which is SGD - though the user can change it if the amount is in other currency but the default should be sgd.

2. if the currency column is SGD, fx rate will automatically be 1.00 otherwise, it should require a manual input of fx rate.

japong5C71_0-1602232697150.png

Thanks in advance 🙂

TOPICS
How to, PDF forms

Views

43

Likes

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

If functions

New Here ,
Oct 09, 2020

Copy link to clipboard

Copied

Hi, im just a newbie in this and hoping someone can help me.

How to add a rule or what script could do,

1. if i enter a value in amount column currency feild will be automatically populated with default currency which is SGD - though the user can change it if the amount is in other currency but the default should be sgd.

2. if the currency column is SGD, fx rate will automatically be 1.00 otherwise, it should require a manual input of fx rate.

japong5C71_0-1602232697150.png

Thanks in advance 🙂

TOPICS
How to, PDF forms

Views

44

Likes

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
Oct 09, 2020 0
Engaged ,
Oct 09, 2020

Copy link to clipboard

Copied

Why not set SGD and 1 as default values or you want fields to be empty if Amount is empty?

Likes

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
Reply
Loading...
Oct 09, 2020 2
New Here ,
Oct 09, 2020

Copy link to clipboard

Copied

yes

Likes

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
Reply
Loading...
Oct 09, 2020 0
Most Valuable Participant ,
Oct 09, 2020

Copy link to clipboard

Copied

It's a bit tricky, but possible. I will do it using the Validation event of the Amount field, using this code:

 

if (event.value) {
	if (this.getField("Currency").valueAsString=="") {
		this.getField("Currency").value = "SGD";
		this.getField("FX Rate").value = "1";
	}
}

Likes

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
Reply
Loading...
Oct 09, 2020 0