From f1cb5d0d178ab39761f972347725ad032977dddf Mon Sep 17 00:00:00 2001 From: Kirk Swenson Date: Mon, 23 Dec 2024 15:38:04 -0800 Subject: [PATCH] fix: lookup functions match user-set title (#1702) --- v3/src/models/formula/utils/name-mapping-utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v3/src/models/formula/utils/name-mapping-utils.ts b/v3/src/models/formula/utils/name-mapping-utils.ts index 887da9e1e..32f41c40d 100644 --- a/v3/src/models/formula/utils/name-mapping-utils.ts +++ b/v3/src/models/formula/utils/name-mapping-utils.ts @@ -69,11 +69,11 @@ export const getDisplayNameMap = (options: IDisplayNameMapOptions, useSafeSymbol displayNameMap.localNames.caseIndex = localAttrIdToCanonical(CASE_INDEX_FAKE_ATTR_ID) dataSets.forEach(dataSet => { - if (dataSet.name) { + if (dataSet.title) { // No LOCAL_ATTR prefix is necessary for external attributes. They always need to be resolved manually by custom // mathjs functions (like "lookupByIndex"). Also, it's never necessary to use safe names, as these names - // are string constants, not a symbols, so MathJS will not care about special characters there. - const dataSetKey = key(dataSet.name, false) + // are string constants, not symbols, so MathJS will not care about special characters there. + const dataSetKey = key(dataSet.title, false) displayNameMap.dataSet[dataSetKey] = { id: idToCanonical(dataSet.id), attribute: {}