SAP Knowledge Base Article - Public

3663844 - SAC : Unexpected results when using API .length property of Input Controls in Story

Symptom

  • When using .length property API in scripts to determine the number of elements in an array when selecting members within an input control, it returns unexpected results.
  • Since the last patch week (21-22 June 2025), it was observed a change where the length calculation directly returns 1 for "A1," bypassing the hierarchy levels. This alteration has disrupted several functionalities, as it would rely on the length value to simulate single selection input controls with hierarchies. Specifically, a length of 3 indicated that only a single country was selected.
  • Historically, the length calculation included each level of a hierarchy. For instance, selecting "A1" in a hierarchy structured as Root → A → A1 would yield a length of 3, accounting for all hierarchy levels.
  • We expect that the ancestors of selected members being returned by the API 

Environment

  • SAP Analytics Cloud 2025.8.13

Cause

This isn't an expected behavior - parents/ancestors node of selected members shouldn't be returned by this API.

Resolution

  • It works as Designed
  • Parents/ancestors node of selected members shouldn't be returned by this API, except all the children under parent/ancestors have been selected. 

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

.length, Parent, ancestor, property, input control, script API , KBA , LOD-ANA-DES , Story Design & Visualizations , LOD-ANA-UNS-SCR , Unified Story Scripting related Issues , Problem

Product

SAP Analytics Cloud all versions