Skip to main content
kelseyl64047574
Participant
June 26, 2019
Question

Need java script for calculating two fields of a Special Arbitrary Format to a Number field

  • June 26, 2019
  • 1 reply
  • 1154 views

I converted an excel sheet to a Form but I need help with Formatting and Calculating with JavaScript.

Need javascript for calculating two fields of a Special Arbitrary Format to a Number field.

[Text1] "004+00" - [Text2] "010+50" = [Text3] "650"

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 26, 2019

What are the actual values of the fields?

kelseyl64047574
Participant
June 26, 2019

004+00 - 010+50 = 650

These are references on some engineering alignment sheets that measure distance.

004+00 is 400'

010+50 is 1050'

650 is 650'

try67
Community Expert
Community Expert
June 26, 2019

The Format setting influences what the value of the field looks like, not its actual value.

What does this line of code produce when the value of Text1 is "004+00":

this.getField("Text1").valueAsString

?