0

How to trigger two things at once using 'if, then else'

Hello, i'm hoping this is a simple question to answer. In the trigger formula below you'll see that i am trying to trigger two things at the same time (in bold). I have succeeded in triggering both of these changes independently, but I'm struggling to find a way to trigger both at the same time. 

if 'Propagation Method' = 1 and 'Sown / planted into' = 1 then Trays := true and 'Trays Start Date' := 'Propagation Date' else........

Any suggestions would be much appreciated.

Ben

5 replies

null
    • Sean
    • 4 yrs ago
    • Reported - view

    Hi, try this...

     

    Trays := true;

    'Trays Start Date' := 'Propagation Date'

    • Earthsong Seeds
    • Ben_Heron
    • 4 yrs ago
    • Reported - view

    Yes! Thank you Sean. That's what i was looking for - so simple when you know how!

    Incidentally, would anyone mind explaining what is the purpose of using the colon before equals (:=) rather than equals on its own (=)? I can't figure out when i'm suppose to use it and when i'm not.

    Many thanks again

    Ben

    • Deaf Link, Inc.
    • Glenn_Shell
    • 4 yrs ago
    • Reported - view

    Ben,

    I struggle with the = sign setup, too. It's a bit strange if you ask me, but:

    The = sign by itself is basically asking if what is on the left equals what is on the right. That is, are they equal.

    The := (I believe they call it "stack equal") assigns the value on the right to the variable on the left.

    The != (I believe they call it "exclaim equal") is basically a "not equal" test. Opposite of the equal sign by itself. To me, from a programming standpoint, I would rather just have the = sign do what the stack equal does and then use an If statement to handle the other two conditions.

    Hope that helps.

    Glenn

    • Earthsong Seeds
    • Ben_Heron
    • 4 yrs ago
    • Reported - view

    Thank you Glenn, that's a massive help.

    Much appreciated

    Ben

    • Deaf Link, Inc.
    • Glenn_Shell
    • 4 yrs ago
    • Reported - view

    You are quite welcome, Ben. I must admit that I actually learned that from Nioxus, which is a Premier Partner for Ninox in the US. They are working on creating an online manual. I really like Ninox but the lack of documentation is a great hinderance.

    Glenn

Content aside

  • 4 yrs agoLast active
  • 5Replies
  • 1345Views