Question
How to edit nested objects in Appian Script task in process
Hi,
I have a data like
{
'type!{urn:com:appian:types:CB}CB_Builder_Checklist_And_Items'(
'checklist': 'type!{urn:com:appian:types:CB}CB_Builder_Checklist'(
'id': 32,
'name': "Test",
'description': "Test",
'owner': "",
'use_group_additional_owners': false
),
'checklistItems': {
'type!{urn:com:appian:types:CB}CB_Builder_C_Item'(
'id': 47,
'name': "Test1",
'item_type_id': 6,
'isInterval': false,
'validate_answer': false,
'owner': "",
'use_group_additional_owners': false,
'choice_multiple': false,
'mandatory_comment_fail': false,
'description': "Test"
)
}
),
'type!{urn:com:appian:types:CB}CB_Builder_Checklist_And_Items'(
'checklist': 'type!{urn:com:appian:types:CB}CB_Builder_Checklist'(
'id': 47,
'name': "Test",
'description': "Test",
'owner': "",
'use_group_additional_owners': false
),
'checklistItems': {
'type!{urn:com:appian:types:CB}CB_Builder_C_Item'(
'id': 72,
'name': "Test1",
'item_type_id': 8,
'isInterval': false,
'validate_answer': false,
'owner': "",
'use_group_additional_owners': false,
'choice_multiple': false,
'mandatory_comment_fail': false,
'description': "Test"
)
}
)
}
now I have to assign all the ids to null value in a script task in process model. How to do that?
I have tried:
a!forEach(
items: pv!ChecklistsAndItems,
expression: {
fv!item.checkist.id:1,
a!update(data:fv!item.checklistItems, index:"id", value: 1)
}
)
It not worked for me. How to achieve this?
