Next column values not displaying using a!hierarchyBrowserFieldColumns

Hello,

 

I am trying to display the next column values using a!hierarchyBrowserFieldColumns, but I am getting the below error

Interface Definition: Expression evaluation error at function a!hierarchyBrowserFieldColumns [line 27]: Error in a!forEach() expression during iteration 1: Expression evaluation error at function a!hierarchyBrowserFieldColumns_buildMainPathNode [line 127]: A columns browser component [label=“”] has an invalid value for “nodeConfigs” when fv!nodeValue is . “nodeConfigs” must not have a null value for “id”.

sample code:

load(
local!jsonResponse:{
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "1", objectName: "Application", parentId: "1", objectType: "dm_folder", level:"1"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "2", objectName: "End Of Trial", parentId: "1", objectType: "dm_folder", level:"1"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "3", objectName: "IMPD", parentId: "1", objectType: "dm_folder", level:"1"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "4", objectName: "Input", parentId: "1", objectType: "dm_folder", level:"1"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "5", objectName: "Internal", parentId: "1", objectType: "dm_folder", level:"1"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "6", objectName: "Output", parentId: "1", objectType: "dm_folder", level:"1"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "7", objectName: "Test", parentId: "1", objectType: "dm_folder", level:"2"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "8", objectName: "Test2", parentId: "1", objectType: "product_document", level:"2"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "9", objectName: "Test3", parentId: "1", objectType: "product_document", level:"2"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "10", objectName: "ABC", parentId: "2", objectType: "dm_folder", level:"2"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "11", objectName: "XYZ", parentId: "2", objectType: "dm_folder", level:"2"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "12", objectName: "OUT", parentId: "2", objectType: "dm_folder", level:"2"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "13", objectName: "IN", parentId: "7", objectType: "dm_folder", level:"2"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "14", objectName: "QWER", parentId: "7", objectType: "dm_folder", level:"3"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "15", objectName: "ASDF", parentId: "12", objectType: "dm_folder", level:"3"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "16", objectName: "ZXCV", parentId: "11", objectType: "dm_folder", level:"3"),
'type!{urn:com:appian:types:folders}CMN_folderJSON'( objectId: "17", objectName: "MNB", parentId: "7", objectType: "dm_folder", level:"3")
},
local!path,
local!selection,
local!numberOfNodesInFirstColumn: length(local!jsonResponse),
local!firstColumnValues: cast(typeof({'type!{urn:com:appian:types:folders}CMN_folderJSON'()}),a!forEach(items:local!jsonResponse,expression:if(fv!item.level="1",fv!item,{}))),
local!caseDocumentsFolder:{cast(typeof({'type!{urn:com:appian:types:folders}CMN_folderJSON'()}),a!forEach(items:local!jsonResponse,expression:if(fv!item.level="2",fv!item,{})))},
local!caseDocumentsOutputFolder:{cast(typeof({'type!{urn:com:appian:types:folders}CMN_folderJSON'()}),a!forEach(items:local!jsonResponse,expression:if(fv!item.level="3",fv!item,{})))},
a!hierarchyBrowserFieldColumns(
firstColumnValues: local!firstColumnValues,
nodeConfigs:if(typeof(fv!nodeValue) = 'type!{urn:com:appian:types:folders}CMN_folderJSON',
a!hierarchyBrowserFieldColumnsNode(
id: fv!nodeValue.objectId,
label: fv!nodeValue.objectName,
image: a!documentImage(document: a!iconIndicator("FOLDER"))
),
{}
),
pathValue: local!path,
pathSaveInto: local!path,
selectionValue: local!selection,
selectionSaveInto: local!selection,
nextColumnValues: if(typeof(fv!nodeValue)='type!{urn:com:appian:types:folders}CMN_folderJSON',
a!forEach(
items: local!caseDocumentsFolder,
expression: with(
local!caseDocumentsFolder: fv!item.objectId,
a!forEach(
items: local!caseDocumentsOutputFolder,
expression: if(local!caseDocumentsFolder=fv!item.parentId,fv!item,{} )
)
)
),{}
)
)
)

I need to show the UI as below

Here O: objectId and P: parentId

For next column, the condition is the next column nodes (Test ParentId:1) parentId should be mapped to the objectId of previous level node (Application objectId:1).

Please help........

Thanks in advance

Divya

  Discussion posts and replies are publicly visible