Skip to main content
masonb77741322
Participating Frequently
Apr 30, 2019 1:24 PM UTC
Answered

IF Function with Less Than Values

How do you formulate an IF function where if the value of Field "C" is less than 70,000, then the value of Field "Tier 2" is not formulated?

Right now, this is what I have:

event.value = (70000-this.getField("C").value)*0.2;

if(C<70000)event.value,"Not Commissionable"

I know this isn't correct as I am not a professional with Javascript or Advanced Calculations, but I would like to know how to do this.

Thank you!

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Apr 30, 2019 1:54 PM UTC

Almost... Try this:

var C = Number(this.getField("C").valueAsString);

if (C<70000) event.value = "Not Commissionable";

else event.value = (70000-C)*0.2;

4 replies

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Apr 30, 2019 1:54 PM UTC

Almost... Try this:

var C = Number(this.getField("C").valueAsString);

if (C<70000) event.value = "Not Commissionable";

else event.value = (70000-C)*0.2;

Translate
masonb77741322
Participating Frequently
Apr 30, 2019 2:29 PM UTC

Even though the value "Not Commissionable" didn't populate (not your fault as I was just testing the software), thank you for your response! Your formula worked for what we needed it for!

Translate
try67
Community Expert
Community Expert
Apr 30, 2019 2:41 PM UTC

Make sure you set the field's Format to None for it to work.

Translate