Extending static entities — Part 1

Some of the static entity patterns we’ll be discussing in this article.

Exposing a fixed lookup table

Geo component from Forge

Static records for component options

Static entities exposed by OutSystems UI
Some suggested colour values for the Tag component, derived from the records of the Color static entity.
  • OutSystems Maps, uses static entities for different map layers, zoom levels, styles, and many more options.
  • Ultimate PDF, uses static entities to represent standard print paper sizes and margin sizes.
  • ZXing Services, uses static entities to configure which barcode format to use.

Static entities from library modules

Some static entities cannot be referenced in database contexts.

Extending static entities

A custom colour that was added to the OutSystems UI palette.

Subtyping

The Color input parameter, of Color Identifier type.
MyCustomColor is a subtype of Color.
/*
* Defines what Entities.Color.RebeccaPurple looks like
* when applied to a background such as in a Tag or
* CardBackground component.
*/
.background-rebeccapurple {
background-color: rebeccapurple;
}
A tag with the rebeccapurple custom colour in design-time.
MyCustomPaperSize subtyping the PaperSize entity.

Constructible static records

  1. The identifier of the static entity must not be an autonumber, and I would recommend to use a Text data type.
  2. The static entity should never be queried from the database, nor have its Get action invoked.
PaperSize static entity from Ultimate PDF is also constructible.
Custom PaperSize using a constructor function.
Creating a constructor function for custom OutSystems UI colours.

Conclusion

--

--

--

I'm the Head of Delivery of Phoenix Services, and one of the OutSystems MVPs. I enjoy writing about UX, web development, and low-code.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Digital Transformation-Slack Integration with Airtable

Automation with Cypress

Angstrom CTF 2020 — Misc Shifter Writeup

Comparing Arrays.sort() and Collections.sort() in Java

Disabling & Setting Up Custom Keys in Ruby ActiveRecord & Sinatra (Phase 3)

XRI and Jasmy to Launch Decentralized Autonomous Information Bank in Japan

Passing the AWS CCP & Solutions Architect Associate-C02

Amazon API Gateway: Securing Endpoints using API Keys

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Leonardo Fernandes

Leonardo Fernandes

I'm the Head of Delivery of Phoenix Services, and one of the OutSystems MVPs. I enjoy writing about UX, web development, and low-code.

More from Medium

The Fixed-Point Fable

REASONS WHY SOFTWARE TESTING IS IMPORTANT?

Building Software Architecture is Fun but not a Game.

Are you asking these questions while running Performance tests for your software application?