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

If functions

New Here ,
Oct 09, 2020 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

318

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

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

Copy link to clipboard

Copied

LATEST

yes

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 ,
Oct 09, 2020 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";
	}
}

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