Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Help - Scripting for LiveCycle 7

Avatar

Former Community Member

I am working in Adobe Professional, LiveCycle Designer 7.  I need help with scripting.

My numeric field names:

I want the formula to calculate a per-project limit based on 2 criteria as follows:

If the multiplier box contains a value 71 or greater, multiply the highest project amount by 1.7 but

If the multiplier box contains a value of 70 or less mulitply the highest project amount by 1+multiplier (e.g 1.69).

Thank you

3 Replies

Avatar

Level 6

* script is dependent on actual field names and hierarchy you set in your design....however you could use the following as sample.

//JavaScript code

var mPlier = multiplier.rawValue

var pAmount = projectAmount.rawValue

if (mPlier >= 71) {

     prePLimit.rawValue = pAmount * 1.7;

}else {

     prePLimit.rawValue = pAmount * (1+mPlier);

}

Good Luck,

Avatar

Former Community Member

How do I set a field value to a percentage?

I have my fields named and when I adjusted the script you supplied with my field names, it didn't work.

Thank you