Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Javascript help

Community Beginner ,
May 04, 2021 May 04, 2021

Copy link to clipboard

Copied

Field name:  group1, group2

group1 = 200 if group2 is more than zero if not leave blank

How do i write this script please?

TOPICS
JavaScript

Views

593

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
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , May 04, 2021 May 04, 2021
As validation script of "group2" field use this code: this.getField("group1").value = event.value > 0 ? 200 : "";

Likes

Translate

Translate
Adobe Community Professional ,
May 04, 2021 May 04, 2021

Copy link to clipboard

Copied

As validation script of "group2" field use this code:

this.getField("group1").value = event.value > 0 ? 200 : "";

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
community guidelines
Adobe Community Professional ,
May 05, 2021 May 05, 2021

Copy link to clipboard

Copied

LATEST

A general tip: For calculations it's better to use the Calculate event of the target field, unless there's a good reason not to do so.

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
community guidelines