Business Objects - Functions

reviewed: 8 November 2025

Massaging Descriptors on Lists

The key is to create and massage a descriptor using boDesc.create() and use that descriptor as the entity.

function main()
    set( 'salesOrderLine', boDesc.create( 'om/salesOrderLine' ) )

    boDesc.setAttrLabel( [salesOrderLine], 'quantity', <@mlText 'Ordered quantity' > )

    page.render( page.get( './main' ) )
end-function

resource main
    <@page/container
        content: <@page/content
            <@page/data/table/qsearch
                iterator: iterator.ofEntity(
                    entities: <
                        <@iterator/entity
                            name: 'salesOrderLine'
                            entity: [salesOrderLine]
                        >
                    >
                )
                group: 'description'
            >
        >
    >
end-resource

List Totallers

Notes: this requires the base layer.

  • Use class to control the style of the total cell
  • Use format to control the formatting (outputmask) of the total value
  • Use tooltip to add a tool-tip to the total value
  • Use valueAttribute to sum the value of another attribute than the attribute associated with the column

List totallers

resource main
    <@page/container
        content: <@page/content
            <@page/data/table
                iterator: iterator.ofEntity(
                    entities: <
                        <@iterator/entity
                            name: 'salesOrderLine'
                            entity: 'om/salesOrderLine'
                        >
                    >
                )
                group: 'description'
                totallers: <
                    <@page/data/table/totaller
                        attribute: 'netLinePrice'
                    >
                    <@page/data/table/totaller
                        attribute: '_totalReadyItems'
                    >
                >
            >
        >
    >
end-resource

Extended search

Notes: this requires the base layer.

  • Combine the traditional filter and the new entities option
  • The where clause impact of the entities section is handled by the qualifier
resource main
    <@page/container
        content: <@page/content
            <@page/data/table/qsearch/extended
                filter: <@page/data/table/qsearch/extended/filter
                    name: '//filter'
                    entity: 'ms/_filter'
                    groups: 'objects.main'
                    entities: <
                        <
                            name: '//object'
                            entity: 'om/object'
                            iteratorEntityName: 'object'
                            groups: 'id,electricalStatus,mechanicalStatus,reference,SAPReference,FEReference,serialNumber,QRCodeReference'
                        >
                    >
                >
                iterator: iterator.ofEntity(
                    entities: <
                        <
                            name: 'object'
                            entity: 'om/object'
                            orderBy: 'reference'
                            where: $buildString(
                                '&',
                                if(
                                    isNotNull( bo.attr( [//filter], 'make' ) ),
                                    '#exists[ rd/make, #qsearch( search, { bo.attr( [//filter], "make" ) } ) ]',
                                    ''
                                ),
                                if(
                                    isNotNull( bo.attr( [//filter], 'model' ) ),
                                    '#exists[ rd/model, #qsearch( search, { bo.attr( [//filter], "model" ) } ) ]',
                                    ''
                                ),
                                if(
                                    isNotNull( bo.attr( [//filter], 'objectType' ) ),
                                    '#exists[ rd/objectType, #qsearch( search, { bo.attr( [//filter], "objectType" ) } ) ]',
                                    ''
                                )
                            )
                        >
                // Rest of code example left out...