0

Funzione if

Sucsate la banalità della domanda ma non riesco a far funzionare la funzione if

 

if 'Periodicità' = "semestrale" then
Importo * 2
else
if 'Periodicità' = "annuale" then
Importo
else
if 'Periodicità' = "mensile" then
Importo * 12
else
0
end
end
end

 

questa formula mi da come risultato sempre 0

 

ho controllato tantissime volte che tutti i valori del campo Periodicità siano ortograficamente corrette e corrispondenti, ma nulla.

 

perché non funziona?

2 replies

null
    • Mel_Charles
    • 2 yrs ago
    • Reported - view

    I have just reproduced this and it works as follows :-

    I've assumed that the perodicity field is a choice field and put the result into a total field.

    if so change it the internal choice values. ie semi-annual = 1 etc.

    also I put the script in trigger after uodate on choice field

    if Period = 1 then
    Total := Amount * 2
    else
    if Period = 2 then
    Total := Amount
    else
    if Period = 3 then Total := Amount * 12 else 0 end
    end
    end

     

    Screenshot 2021-10-19 at 13.49.47

    • Web_Namer
    • 2 yrs ago
    • Reported - view

    Mel Charles,

    thanks to you I solved the problem. Thank you so much!

Content aside

  • 2 yrs agoLast active
  • 2Replies
  • 195Views