Allow actions to be used in client side functions
707
Views
12
Comments
New
Builtin & User functions

When I try to use the built-in action ListAny in a client action that needs to be a function, I currently get the error message saying 

Only actions that are functions can be used in other functions.

From the documentation I get it that you don't want to perform asynch or server calls within a client function, but surely ListAny (or any other 'harmless' action) should be allowed? 

Or, at the very least, please make a function version of the built-ins ListAny, ListIndexOf and ListAny available.

Agree, these Built-in actions should be allowed +1

2014-02-07 17-02-43
Vasco Pessanha

Hey Wouter,

You are right. Calling asynchronous operations (e.g. server calls) in functions used in the UI would bring a whole level of complexity to our language and development experience.

Nevertheless, known simple actions like the ones you mentioned (ListAny or ListIndexOf) should be allowed to be used as functions, or inside other functions.

Thanks for your idea and contribution!

Merged this idea with 'Client Functions should support ListFilter' (created on 11 Jun 2021 08:08:59 by Hans Dollen)

I want to filter through a list client side using a client action that is a function. Right now it is not supported to use ListFilter. 

The function exists but it seems that it doesn't work properly needing to be requested on a server action.

I'm talking about the client side ListFilter, see the red message:

Got it now.

Both on client actions and server actions, the only List related actions with function ability are ListDistinct and ListDuplicate.


ListFilter, ListIndexOf, ListAny or any other that returns a single input could be a function.

indeed José!

I have never understood this at all myself. It seems like such an obvious oversight.

J.Ja

Yes it should

@OutSystems when can we expect to see this? It seems like a big gap in functionality...