Skip to main content
Known Participant
August 29, 2023
Question

IF cell value is greater that < 5000

  • August 29, 2023
  • 1 reply
  • 291 views

Hello all , im pretty new to JS any help would be much appriciated . 

 

I have a form im working with 2 cells in particulr that im having an issue with the script. 

 

This script will go on the Cell "CALC_HTotal>5000" 

 

If cell "CALC_P4H_TOTALS" is > 5000 then "CALC_HTotal>5000" will need to report that value . If "CALC_P4H_TOTALS" < 5000 then "CALC_HTotal>5000" will need to be blank . 

 

Thank you in advance . 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 29, 2023

You can use this code:

 

var v = Number(this.getField("CALC_P4H_TOTALS").valueAsString);
event.value = (v>5000) ? v : "";