SEGMENTDESCRIPTION Function

Created by Harry Lewis, Modified on Tue, 16 Jul at 9:33 AM by Gabriel Michaud

Applies to:

  • Velixo Classic (7.1.159 or higher)
  • Velixo NX
  • ERP: Acumatica, CEGID, Haufe x360, JAMIS Prime, MYOB Acumatica


The SEGMENTDESCRIPTION function returns the description(s) of a segmented key(s) as defined within the ERP.


TABLE OF CONTENTS


Syntax


SEGMENTDESCRIPTION(ConnectionName, SegmentedKeyName, SegmentId, Range, IncludeDescription)


Parameters


The SEGMENTDESCRIPTION function uses the following parameters:


Parameter

Required/Optional

Description

ConnectionName

Required

The name of the connection as configured in the Connection Manager.

SegmentedKeyIdRequiredThe segmented key name for which to filter segments.
SegmentIdRequiredThe segment number for which to filter segments.
LookupValueRequired
The segment value (or an array of segment values) specifying for which segments we want to display descriptions.
KeepRawIfNotFoundOptionalTrue (default)
or
False

If a description for the LookupValue is not found in the ERP, this parameter determines whether the function returns the LookupValue itself or returns a #VALUE! that can be trapped using Excel's IFERROR() function.
ValueModeOptional0 (default) - interprets the value specified in the LookupValue parameter as the full segmented key value (e.g., full subaccount).
or
1 -interprets the value specified in the LookupValue parameter as the individual segment for the segment specified in the SegementID parameters (e.g., the 2nd segment of the subaccount).

When using the 1 option, if the value specified in the LookupValue parameter is longer than the length of the SegmentID (as defined within the ERP), the function will return #VALUE!




Example


Given the following configuration within the ERP:



Example 1 - Description of segment 1 from full subaccount

=SEGMENTDESCRIPTION("Demo", "Subaccount", 1, B4#)


Description

Returns an Excel array containing the descriptions of the first segment 1 values for the subaccounts returned by the function in cell B4

 

Result


 



Example 2 - Description of segment 2 from full subaccount

=SEGMENTDESCRIPTION("Demo", "SUBACCOUNT, 2, B4#)


Description

Returns an Excel array containing the descriptions of the second segment values for the entire SUBACCOUNT returned by the function in cell B4 (and returning the subaccount segment value if the description is not found in the ERP)

 

Result




Example 3 - Description of segment 2 from only the segment value

=SEGMENTDESCRIPTION("Demo", "SUBACCOUNT, 2, D4#, , 1)


Description

Returns an Excel array containing the descriptions of the second segment values returned by the function in cell D4:

 

Result



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article