When use a User Function

Why is better to you a User Function than a Built-In Function?


  • Reuse logic with User Actions.
  • Reuse screen parts with Blocks.
  • Encapsulate data formatting with User Functions.
  • Use RefreshQuery to rerun a Query.

Source: https://success.outsystems.com/documentation/best_practices/development/outsystems_platform_best_practices/


Hello Ana Russo, 

The question, "Why is it better to use a user function than a built-in function?" is not entirely directly related to the previous statements about reusing logic with user actions, reusing screen parts with blocks, and encapsulating data formatting with user functions. It has not been said that you should or it is better to use user functions besides built-in functions. Sometimes, you might prefer using a user function over a built-in function, but it depends on the context itself. 

User functions allow developers to create custom functions according to their specific needs. Built-in functions, on the other hand, are pre-defined and may not always meet the unique requirements of a particular application.

Also, with user functions, developers have complete control over the logic and behavior of the function. They can modify and extend it as needed. Built-in functions are fixed and may not adapt as easily. 

Again, the decision to use user functions over built-in functions often depends on the specific needs and goals of your projects/apps. In many cases, a combination of both may be the most practical approach. 

Best regards, 


Hello Ana,

The documentation does not state it the way you interpreted. Built in functions are readily available and widely known. So if there is an appropriate built in function available serving my needs, I would never write a user function doing the same job. 

This documentation is more to bring to developers attention the different approaches that are available in OutSystems to implement reusability.

Hope it helps!


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.