Skip to main content

Component Naming Conventions

When building a solution that uses OneStream components—such as buttons, labels, combo boxes, and other UI elements—it’s crucial to maintain consistent naming. A clear naming convention enhances code readability, simplifies component identification, and streamlines collaboration across teams.

Best Practice: Prefixes in Naming

Use a three-character prefix followed by an underscore (_) to indicate the component type. The remainder of the name should describe its specific purpose or role. This approach keeps the codebase organized and makes it easy to locate or update components.

For Example:

  • Button: btn_SaveData
  • Label: lbl_PropertyName
  • Combo Box: cbx_DatabaseList

This method keeps code bases organized and easy to navigate. When developers need to update, reference, or debug specific components, the prefix quickly identifies the type of element they are dealing with, improving efficiency.

Benefits of Naming Conventions

  1. Improved Readability: A descriptive prefix makes the component type obvious at a glance, so the code is easier to understand.
  2. Standardization: Consistent prefixes ensure everyone on the project follows the same structure, reducing confusion and errors.
  3. Faster Debugging: When troubleshooting, the prefix helps to quickly locate the relevant element, saving time when locating and modifying components.
  4. Enhanced Collaboration: A shared naming convention allows team members—whether frontend, backend, or QA—to work together more effectively, since everyone understands the format.

By following these best practices, we can ensure the code is well-structured, easy to maintain, and scalable.

Common OneStream Component Prefixes

Here is a list of common OneStream components and their three-character prefixes:

Component NamePrefix
BI Viewerbiv
Book Viewerbvw
Buttonbtn
Chartcht
Check Boxchk
Combo Boxcbx
Cube Viewercvw
Data Adapterdat
Data Explorerdex
Data Explorer Reportder
Date Selectordts
Embedded Dashboardemd
File Viewerfvw
Filter Editorfed
Gantt Viewgnv
Grid Viewgrd
Imageimg
List Boxlbx
Labellbl
Large Data Pivot Gridlpv
Date Selectordts
Embedded Dashboardemd
File Viewerfvw
Filter Editorfed
Gantt Viewgnv
Grid Viewgrd
Imageimg
List Boxlbx
Labellbl
Large Data Pivot Gridlpv
Logolgo
Mapmap
Member Treemmt
Password Boxpwd
Pivot Gridpvg
Radio Button Grouprbg
Reportrpt
Spreadsheetspd
Supplied Parameterspp
Text Boxtxt
Text Viewertvw
Tree Viewtrv
SQL Table Editorted
Web Contentweb
State Indicator (windows app only)sti
Sankey Diagram (windows app only)skd

Was this page helpful?