conversions

Viewing 3 reply threads
  • Author
    Posts
  • September 7, 2023 at 4:36 PM #49818

    Glen Forister
    Participant

    I have two fields in each record that are “feet” & “meters” – the elevation of a location.

    Sometimes I know the feet and sometimes I know the meters to enter, but rarely both without converting with another app.  Is there a way to enter either entry and have the other automatically calculated?  I know I can do one-way calculation, but how would I do one or the other?

     

    September 7, 2023 at 7:36 PM #49820

    Brendan
    Keymaster

    Hi Glen,

    You would need to use a Script field for this. In your Script field you’ll need to get the value of each field. Then do your conversion, then set the value in the other field. Just check to make sure you set the value on the field if it’s empty.

    https://www.tapforms.com/help-mac/5.3/en/topic/javascript-api

    Have you done any scripting in Tap Forms before?

    Thanks,

    Brendan

    September 7, 2023 at 9:55 PM #49821

    Glen Forister
    Participant

    I’ve tried to learn, but just can’t spend enough time to remember enough.  Went through quite a bit of a javascript course, but then time got short and I started forgetting stuff.

    If this was a little bit more straight forward, I would try ChatGPT.  I’ve asked it to program some things and I’m amazed at the results.

    The other concern is since I already have 70 records all filled in I don’t want to lose that data, so I have to build in a double if clause that if both fields are filled not to do anything (I guess that would be my first If clause in which all else would occur.

    Some Script help here would be greatly appreciated.

    Thanks.

    October 9, 2023 at 11:52 PM #49963

    Peter Willcox
    Participant

    Hi,

    You could have a record which records the value. A second record with a dropdown which loads if the measurement is metric or imperial. A 3rd record which is a calculation field which performs the conversion based on what the second record is set at based on an ‘If’ calculation.

     

Viewing 3 reply threads

You must be logged in to reply to this topic.