How to do a expression to compare de number of Month with his name?

In a Assign activity, I want to do a VB expressions.
My code is:

If (test = 4) Then
month1 = ‘Abril’
ElseIf (test = 5) Then
month1 = ‘Maio’
End If

The variable test returns, in this case, 4.

It apepears this error: End of expressions expected

Hello @francisco.p.a,

I think assign activity is mainly used for assigning a value to a given variable. You should try using invoke code activity to write your block of code, and pass the final values using arguments.

Hope it helps

Hi @andr3y26,

Thanks for your answer.
Using the “Invoke code” activity I can get the values from my workflow and pass the final values?

In arguments, it is defined with the direction In/Out?
I don’t find information about the implementation of invoked code.

Thanks!

Yes, attached i’ve put a simple example, make sure you set the same type for the argument and the given variable

Main.xaml (8.4 KB)

Thank you @andr3y26.

I understood with your example!

Best regards,
Francisco