Function with more than one output parameters
Builtin & User functions

Currently we have the restriction that Function must have only one output paramter. This restriction sometimes makes our life difficult to use any function with two parameters inline.

My proposal is to allow the User to define Functions with more that one output parameter. So that it can be used inline with more than one parameter. To use multiple out paramters, keywords like OutParam1, OutParam2,...OutParamN can be used. If there is any problem in implementing this feature, it can be restricted to say maximum of 3 output parameters only.
The inline usage of this kind of Function may look as shown below:

Hi @Maheswarlu Madugundu ,

I'm not necessarily convinced it is a good practice to have functions with multiple outputs, maybe your functions are doing too much and should be split up.  

But that being said, if you define the output of your function as a record, you can accomplish this already with current Outsystems.

let's say you have a function returning a person's name in a few different display formats:

you can use that function inside an expression, for example on a screen

and this is result when testing, both formats side to side using expressions in a table widget

Hi @Dorine Boudry ,
Thanks a lot for the explanation. Yes, it can be achieved by defining the output of the function as a record.
Best Regards,

2020-04-15 12-37-36
Daniël Kuhlmann

Hi Maheswarlu,

Would you agree, with the info that Dorine shared, your idea could be marked as out of scope?