{ { requestTypeId: { description: "Request Type Unique Identifier", type: "integer", questionSet: "global", required: true, typedesc: "Text" }, automationId: { description: "Automat Recipe or Campaign Builder Id", type: "string", questionSet: "global", required: true, typedesc: "Text" }, status: { description: "Automation Source", type: "integer", questionSet: "global", enum: { 157, 158, 159, 160, 161, 162, 163 }, enumLabels: { "Automat", "Crossroads", "Member Web", "Public Directory", "Member App", "Provider Portal", "Faxblast" }, typedesc: "Single-Select" }, subStatus: { description: "Reported On Date / Time (format: YYYY-mm-DDTHH:MM:SS)", type: "string", questionSet: "global", typedesc: "Date and Time" }, contactPhoneNumber: { description: "Contact Phone Number", type: "string", questionSet: "global", typedesc: "Text" }, contactEmail: { description: "Contact Email", type: "string", questionSet: "global", typedesc: "Text" }, dctLink: { description: "DCT Link", type: "string", questionSet: "global", typedesc: "Text" }, insuranceMarket: { description: "Insurance Market", type: "string", questionSet: "global", enum: { "Individual", "Medicare Advantage", "Self Insured", "Small Group" }, enumLabels: { "Individual", "Medicare Advantage", "Self Insured", "Small Group" }, typedesc: "Single-Select" } }}
Discussion posts and replies are publicly visible
A very compact solution to your problem. Please check the documentation for a!keys(), a!update(), reduce(), merge() and apply().
The idea is to create a new map from scratch and copy only the required fields from the old map.
a!localVariables( local!data: { requestTypeId: { description: "Request Type Unique Identifier", type: "integer", questionSet: "global", required: true, typedesc: "Text" }, automationId: { description: "Automat Recipe or Campaign Builder Id", type: "string", questionSet: "global", required: true, typedesc: "Text" }, status: { description: "Automation Source", type: "integer", questionSet: "global", enum: { 157, 158, 159, 160, 161, 162, 163 }, enumLabels: { "Automat", "Crossroads", "Member Web", "Public Directory", "Member App", "Provider Portal", "Faxblast" }, typedesc: "Single-Select" }, subStatus: { description: "Reported On Date / Time (format: YYYY-mm-DDTHH:MM:SS)", type: "string", questionSet: "global", typedesc: "Date and Time" }, contactPhoneNumber: { description: "Contact Phone Number", type: "string", questionSet: "global", typedesc: "Text" }, contactEmail: { description: "Contact Email", type: "string", questionSet: "global", typedesc: "Text" }, dctLink: { description: "DCT Link", type: "string", questionSet: "global", typedesc: "Text" }, insuranceMarket: { description: "Insurance Market", type: "string", questionSet: "global", enum: { "Individual", "Medicare Advantage", "Self Insured", "Small Group" }, enumLabels: { "Individual", "Medicare Advantage", "Self Insured", "Small Group" }, typedesc: "Single-Select" } }, local!reducedFields: difference(a!keys(local!data), {"status", "subStatus"}), reduce( a!update(_,_,_), a!map(), /* Start with an empty list */ merge( /* Create a list of tuples containing the field name and the field's value */ local!reducedFields, apply(index(local!data,_,null), local!reducedFields) ) ) )