0

2 choices trigger same action

Hello,

I want the following:
Datefield2 only displays date from Datefield1 if Status is 1 or 2
I put in Status, Trigger after update:
Datefield2 := null;
Datefield2 := if Status = 1 or 2 then
Datefield1
end

It works if it only applies to 1 Status status 1 or 2 seems not to work. What am I missng?

Next I want the chosen status trigger this to a number of datefelds, so Datefield4 only displays date from Datefield3 if Status is 1 or 2 etc.
How to put all of this in one formula?

Thanks for your help.

2 replies

null
    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    Datefield2 := if Status = 1 or Status = 2 then
    Datefield1
    else
    null
    end;
    Datefield4 := if Status = 1 or Status = 2 then
    Datefield3
    else
    null
    end

    • About Argyll Walking Holidays
    • Frieda_Bos
    • 3 yrs ago
    • Reported - view

    Thanks to Jörg I solved it this way:

    if Status = 2 or Status = 3 then
    Datefield2 := Datefield1;
    Datefield4 := Datefield3
    else
    Datefield2 := 0;
    Datefield4 := 0
    end

Content aside

  • 3 yrs agoLast active
  • 2Replies
  • 368Views