Only actions that are functions can be used in other functions: why?


Why can't a client action marked as a function in a mobile app use other client actions that are not marked as functions?

I get the error "Invalid Client Function" error in Service Studio with the explanation "(...) Only actions that are functions can be used in other functions" once I use a client action that is not a function within the flow of another client action marked as a function.

I don't see a reason for not being able to do so. It would be nice to get rid of this constraint ;)

Created on 30 Mar 2018
Comments (7)

Hi Pedro Rodrigues,

First of all, thank you for your feedback. 

Can you share your use case? (i.e. what are you trying to achieve that needs a Client Action inside a Client Funcion?)


Hi Nuno, I have a client action where I'm using the ListAppend action inside to build up a list iteratively. As the ListAppend is not a function, service studio does not allow me to set my client action as a function. I find this strange. This limitation does not hold for server actions.

Greetings, pedro

Thank you Pedro for your valuable feedback. 

We will analyze this idea. 

If you have more to add, just write us down. 


Hey Pedro,

Thanks for the feedback!

Do you have examples of this with other actions/functions other than list actions?


Hi Vasco,

here are some more examples:

a) A client action that is not a function and is called from within another client action that you mark as a function. 

b) You try to access a local storage entity, by using an aggregate or the Get<Entity> action, from within a client action and mark the action as a function. In this case the message states "(...) local storage is not available in client functions."

c) You call a server action from within a client action and mark the latter as a function. The error message states "(...) server actions are not available in client functions."

I would expect that everything that can be used from a within a non-function client action should also be possible to use from within a function client action. The only difference is that a function client action must have one and only one output parameter.

Greetings, Pedro

Hello Pedro,

I know those situations and that's a technical limitation (imagine scenarios where you have an expression widget in the UI that is bound to a function that calls a server action. Should the server call be executed every time the screen is re-rendered?).

I was wondering if you had more scenarios where you wanted to use an action inside a function and you couldn't where that action was not an list action.


Changed the category to Frontend