Calculation Field Creation Crash

Viewing 4 reply threads
  • Author
    Posts
  • April 20, 2020 at 9:49 PM #40358

    Chris Medeiros
    Participant

    I could use some help trying to create a calculation field.

    BACKGROUND: I have two fields. Field one, “Ounces Available”. Field two, “Footage Available”. Either one field or the other will have a value greater than 0, but not both simultaneously.

    GOAL: To have one field show a NULL if the other has a value greater than 0.

    RESULT: I’m able to create the calculation for one field, “Footage Available”. (Please see attachment, “Screen Shot 1”). However, after creating the calculation formula for the second field, “Ounces Available”, when I click on Save, Tap Forms leaves the room.

    Could it be because I’m creating some sort of circular reference?

    Attachment 1: Screen shot of first, successful calculation formula.
    Attachment 2: Screen shot of second, unsuccessful calculation formula, right before clicking Save and Tap Forms blipping off the display.

    NOTE: I can duplicate this issue consistently.

    Attachments:
    You must be logged in to view attached files.
    April 21, 2020 at 1:16 PM #40364

    Brendan
    Keymaster

    Ya, you don’t want to create a circular reference. A -> B -> C -> A, and so on.

    That’ll cause an infinite loop because Tap Forms tries to evaluate the results of the formula by resolving any sub-formulas first. If those sub-formulas reference themselves or referent the parent formula, then you’ll get stuck.

    April 21, 2020 at 3:42 PM #40365

    Chris Medeiros
    Participant

    Ah, okay. I’ll have to figure out another way to achieve my goal. Thanks!

    April 22, 2020 at 10:55 PM #40367

    Sam Moffatt
    Participant

    To potentially work around this, you could use a script field instead and have the script field update the value of the other fields correctly. That way you only have one thing executing (your script field) and it’ll update the fields correctly. You’ll then have to convert the calc fields into normal number fields to finish everything up.

    April 25, 2020 at 8:51 PM #40373

    Chris Medeiros
    Participant

    Thanks Sam. That’s a good solution. I ended up finding a different field to evaluate the result I was looking for.

Viewing 4 reply threads

You must be logged in to reply to this topic.