Breadcrumbs

Retrieving Subaccount Segment Names

Overview

It is very common to design reports which show both accounts and subaccounts. It can definitely help to include the names of the accounts, so as to increase readability of the report.

segment_names00.png

Likewise, it would be convenient to also display the names of one or more subaccount segments, as they are defined in the ERP:

segment_names02.png

With a little extra effort, up front, this can easily be accomplished.

Step-by-Step

  1. Import the custom Generic Inquiry

Import the attached Generic Inquiry to your ERP instance (it returns the contents of ERPs SegmentValue table):

https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/fslUoE2ovxbpI2FF4D75_qbvBdvy1vRhpw.png
  1. Configure the Generic Inquiry Keys
    The first time you add a reference to the new Generic Inquiry to your spreadsheet, you will receive an error message letting you know that the Generic Inquiry keys have not been configured:

    https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/1ZeF3Hem13H_oqowHYupvnB2Mw5zZe8Tww.png


    On the Velixo0 ribbon of the Excel toolbar, click the Options button:

    https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/JvNRdNDf33Jl4ROXDgV7SkkChIcsXEZVuA.png


    Next, double-click on the name of the Generic Inquiry:

    https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/gO2s2tIynF-E1YMIJ6icPajpjmXaHrAxtA.png


    and then click on the button to edit the key fields for the inquiry:

    https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/Zw_LYAcbnPQsLMT1YKMutzmZQSTwcSN5gQ.png


    Use the >> button to move (in order) SegmentedKeyID, SegmentID, and Value from the Available Fields to the Key Fields:

    https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/oZoJutO3sqd9ZW1njKyeSBBFNJ9o2aMyJQ.png


    and then press the OK button.


    Press OK on the Velixo-SegementValues Options dialog:

    https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/3h-uodB2in8xcG6vGgZCHe34zSVi_eHq7Q.png


    and press OK on the Options dialog.

Your report will refresh and your GILOOKUP function will now return a value.

  1. Enter the GILOOKUP function

    Let's assume that we want the description of the first segment "ELE" from the above example.

    That function would look like this:

    =GILOOKUP("Demo","Velixo-SegmentValues","Description","SUBACCOUNT",1,"ELE")
    


    • Demo - would be replaced by the name of your connection

    • 1 - indicates that we are interested in the first segment

    • ELE - indicates the specific subaccount first segment for which we want the description

    Since in our example the subaccount is listed in a cell, we can use Excel's text manipulation capabilities to extract it:

    =GILOOKUP("Demo","Velixo-SegmentValues","Description","SUBACCOUNT",1,LEFT(D27,3))
    


  2. Complete the Report
    We can now add the GILOOKUP functions to the rest of our report:

    https://s3.ca-central-1.amazonaws.com/cdn.velixo.com/helpdesk/CSDojTHkMLQKWPLeWEiZiFdUgDSmgMwvMA.png