Pearl in combination with GETVALUE and Round

I have two values from Pass-In fields: "Tijdstip" and "Reistijd".

I have the following script that does not work

[% Begin Unverified Perl

if(GETVALUE("Tijdstip") ==1) {

return  .  [% round(Reistijd* 0.7,0) %] . " min"; }

if(GETVALUE("Tijdstip") ==2) {

return  .  [% round(Reistijd* 0.5,0) %] . " min"; }

End Unverified %]

Depending on whether my "Tijdstip" is 1 or 2, I would like to show something else.

In addition, I want to multiply my "Reistijd" with a value, and round it. After that value, I want the word "min" to be shown.

Can anyone help me with this?

1 reply