Skip to content

[BUG] bedrock.cube.data.export.bymdx #13

@wimgielis

Description

@wimgielis

[This will also hold in Bedrock V4]

When pTitleRecord = 2 we do not want a title record. Still there is one. We need to add:
If( pTitleRecord > 0 ); around TextOutput( cExportFile, Expand(sTitle) ); in the Data tab.

Additionally, not a bug but there is duplication of code in the Prolog and Data tabs when it comes to, do we want the cube name column or not. For instance the part in the Data tab could be rewritten as:

` If( pTitleRecord = 2 );
nCount = 1;

    If( pCubeNameExport = 1 );
        sTitle = sTitle | '%pFieldDelim%';
    EndIf;

    While( nCount <= nDimensionCount );

        # Determine title string for the source cube
        sPos_Dim = Dimnm( cTempObject, nCount );
        sDimension = Delet( sPos_Dim, 1, Scan( '_', sPos_Dim ));
        sTitle = sTitle | '%pQuote%' | sDimension | '%pQuote%%pFieldDelim%';

        nCount = nCount + 1;
    End;

    # Finish off the strings
    sTitle = sTitle | '%pQuote%Value%pQuote%';

EndIf;`

A simple IF is the only difference the 2 entire blocks of code.
Likewise in the Prolog tab, very similar coding without clear benefit as to why do it not in the shorter, neater, way without duplicating code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions