Allow Get

On our radar
As of version we can use Get<Entity> Action as a function in the expression editor, so we can assign a value like this:

The problem is that this Action/Function is not optimized to just fetch that specific attribute - It will return the whole entity, meaning all attributes. This can have a meaningful impact on the performance of your app and as such, is not recommended.

My Idea is to improve Get<Entity> Action/Function to fetch only one attribute. This means that to be used as function, there would have to be a new Entity Action called "Get<Entity>Attribute"
Created on 11 Apr 2015
Comments (3)
I could do that in previous versions and in the typical OutSystems workflow you will want at least the whole record.

If you really need just one attribute use an advanced query.

Hi Joao,
The Get<Entity> action has been like this for years (probably since day one) and my Idea is to have a new action (available as a funtion like the others) that allows to retrieve only one attribute in an optimized way, meaning that it will only fetch that specific attribute.

GetUser(UserId).User.Name > Currently this function retrieves all the attributes for the record that has the input argument Id as its Identifier, even if you just want one attribute.
Besides the AdvancedQuery suggestion, you can also use an Aggregate. Only the attributes that are used are fetched.