Blog – Work Edition

  • ,

    Refresh a child block from its parent

    My best days are the ones I learn something and today a college shared the following link with me: https://success.outsystems.com/documentation/how_to_guides/front_end/how_to_call_a_block_action_in_a_mobile_screen/, and this immediately remembered the use case where i need to force a refresh on something that lives inside a block, from the parent. First things first. Let me share what I typically do… To… Continue reading

  • ,

    Create or Update CS Pattern

    I’m considering that if you’re interested in this topic, you might be a OutSystems developer and each time you create a new database entity, you create a public action in the related CS module named «EntityName»_CreateOrUpdate.I’ve seen multiple ways to define the code that it’s wrapped inside this action, but I also ended up by… Continue reading

  • ,

    Can I use Database Indexes to avoid fields with duplicated values?

    TLDR: It depends if the field is required or not! Ensuring data integrity is a crucial aspect of database management, and avoiding duplicate values in specific fields is a common challenge. In OutSystems, developers often wonder whether they can rely on database indexes to enforce uniqueness. For this example, lets consider our Contact entity, and… Continue reading

  • ,

    Do you Debounce?

    What is Debounce? Debounce is a programming technique used to limit the rate at which a function executes. It ensures that a function is only triggered after a specified delay since the last time it was invoked. This is particularly useful for optimizing performance in scenarios like handling user input events (e.g., key presses, button… Continue reading

  • ,

    Anonymizing Data

    I guess that you already had a need to anonymize some data!You have a lot of real world information containing person names, addresses, phone numbers, email, etc… and you need to import that information into a production database. However you need to test this in other environments such as Development or Quality, and by the… Continue reading

  • ,

    Automate Solution Publishing

    You might have have a need to automatically publish a Outsystems Solution at a desired time (probably overnight when this don’t affect anyone) to be able to start the next day with all modules refreshed. If you have/had this need, you should also know that Outsystems don’t have this kind of automation. Let’s take a… Continue reading

  • ,

    Proper Action Authorization and Validation

    In this article I’ll describe a way to validate if only authorized users are allowed to perform operations. Let’s consider a simple scenario where we have Contacts that are associated with Companies and the following rules apply:– Rule 1: Users must always be associated with a single Company;– Rule 2: Users can only change their… Continue reading

  • ,

    Avoiding Database Update Concurrency

    Today we’re seeing how can we avoid database concurrency while saving records in the database. As we could see in the previous articles:1. CRUD Pattern – Alert nr. 1 – I’ve shown you a way to avoid changing fields that are supposed to be immutable;2. Validation is Golden Rule – I’ve enforced an idea that you should… Continue reading

  • ,

    The importance of Trim()

    Today we’ll focus on the importance of Trim() action in your code. As you know, Trim() will remove empty spaces from the beginning and end of any string of text. Consider what we’ve discussed in our last article about validation. I’ve shown that you should always validate inputs before storing records in database. While you… Continue reading

  • ,

    Validation is Golden Rule

    In this article I’ll explain why you should always validate inputs and never assume anything. Please consider that we need to create a database table to store contacts. The requirements say that we only need to record Name, Email Address and Phone Number, but only the Name is required. Based on the requirements we ended… Continue reading