0

TRIGGER problem - Help please!

Hello,

I would like to use a trigger to make 2 changes, but my code only seems to make one change and I can't figure out why...can anyone help please? Am I trying to do something that can't be done?

 

Below is a snippet of my code, it changes the insurance value amount in the desired field, but not the courier charge. I had not originally put the brackets in, ninox does this automatically.

I have tried putting the courier charge section in brackets too, ninox just removes them again.

 

if 'Courier Type' = 1 then
'Courier Charge' := 29.99 and ('Insurance Value' := 1)
else
if 'Courier Type' = 2 then
'Courier Charge' := 34.99 and ('Insurance Value' := 2)

 

Thanks in advance! Anna

4 replies

null
    • Sviluppatore Ninox
    • Fabio
    • 3 yrs ago
    • Reported - view

    Hi Anna. Try this:

    ---

    if 'Courier Type' = 1 then
       'Courier Charge' := 29.99;
       'Insurance Value' := 1
    else
       if 'Courier Type' = 2 then
          'Courier Charge' := 34.99;
          'Insurance Value' := 2
       end
    end

    ---

     

       Fabio

    • John_Halls
    • 3 yrs ago
    • Reported - view

    Hi Anna

     

    Didn't we answer this question a week ago?

     

    Regards John

    • Anna_Wenlock
    • 3 yrs ago
    • Reported - view

    Thanks Fabio, I'll try that out.

    Not sure John, and apologies if people had replied. I haven't received any notifications from Ninox about my other post, so assumed it had just gotten lost in the forum. Is there a place within Ninox here where you can find your previous posts and questions easily do you know? 

     

    Anna

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    Hi Anna

    it's not easy to track your posts but what you can do is keep doing what you are doing
    ie put your name on the vbottom of th epost Anna - that you can search for that

    Better still just put anna on any replies you make and put something to help you get back to your own posts ie Anna (NP) ....NP = New Post

Content aside

  • 3 yrs agoLast active
  • 4Replies
  • 354Views