20
Views
5
Comments
Solved
Server Action not avaliable in Expressions
Service Studio Version
11.8.10 (Build 30594)

I am new to OutSystems. Exploring Client Actions and Server Actions. 

OutSystems's Video mentioned that Client and Server Actions is available in expressions when you set as a function.


I found client actions on expressions when set as function But Server Actions not avaliable.

I also did it Public.

How we can call Server Express from Expressions?


Rank: #88
Solution

Hi,

When server action set is function is avilable in expression but server side.

if you are using expression in client side only client funtion available not server action.

If you want use server action function on page in Reactive or mobile 

1. use GetDataFrom Other source 

2. use expression here and now you can use server action.


Regards

Rahul

Hi Outdev,


You cannot call server action directly in expression at client side. To achieve this, you can call a Java Script function inside a expression and in that JS action you can call server action.


Regards,

Sanjay

Rank: #27669

Hi Sanjay,

In Traditional App you can call server action as function inside in expression.

In Reactive /Mobile @Rahul Solution would be good choice instead of calling JS action.


Cheers

Hello Piya,

Yes, that's right. We can call server function in expression in traditional. But did you observe his screenshot?

You can see client action in screenshot which is available only in reactive, so there is no meaning of giving solution for traditional.

Regarding which solution is better, let the user decide it, you should not tell it in personal reply.

Using JS at client side is the best practice and also good for website performance.


Cheers!

Rank: #5985

Hi Rahul,

Now my understanding is clear about call server action in expression. 

1. Server action can call another server action. But can't use inside expressions.

2. For call another Server Action inside expressions like if  /switch, we need to convert Server action as a function. Then we can call another server action.

Right ?