# Server Actions

Hi

What is the difference between a Server action with output parameters and a Server Action defined as a function?

Regards

Sunil Babar

Solution

Hi Sunil,

A Function can be used as an Action. But a Function can also be used in an Expression. For this, Functions can have only a single Output Parameter.

An example:

That's a function, as the Action's Function Property is set to Yes. It can only have a single Output Parameter.

Since a Function is also an Action, you can call it like an Action:

This is what the Assign looks like:

Var 1 is assigned the Output of the MyFunction Action call that's just above the Assign. Var2 calls MyFunction again, and passes the input parameter directly (as is always the case when calling functions).

Solution

Sunil Babar wrote:

Hi

What is the difference between a Server action with output parameters and a Server Action defined as a function?

Regards

Sunil Babar

Hi Sunil,

If you use Server Action you can use multiple output parameter and if if you defined server action as function you can not create more the one output parameter.