Skip to main content
Known Participant
April 18, 2021
Question

can anyone explain in simple terms what does type! do ?

  • April 18, 2021
  • 2 replies
  • 0 views

{
a!gridLayout(
label: "Customer Details for Loan Transaction",
labelPosition: "ABOVE",
headerCells: {
a!gridLayoutHeaderCell(label: "Customer Name"),
a!gridLayoutHeaderCell(label: "Customer Address"),
},
columnConfigs: {
a!gridLayoutColumnConfig(
width: "NARROW",
),
a!gridLayoutColumnConfig(
width: "NARROW",
),
},
rows: {
a!gridRowLayout(
contents: {
a!textField(
value: ri!customerDetails.name,
saveInto: ri!customerDetails.name,
),
a!textField(
value: ri!customerDetails.address,
saveInto:ri!customerDetails.address,
),
},
),
},
addRowLink: a!dynamicLink(
label: "add field",
value: 'type!{urn:com:appian:types:SSA}SSA_CustomerDetails'(),
saveInto: ri!customerDetails,
),
selectionSaveInto: {},
validations: {},
shadeAlternateRows: true
)
}

In the above expression, by clicking on Link, a new empty rows are added to grid, and type! plays a role in it, i'm still confused, how does type! will do it exactly?

    2 replies

    stefanhelzle0001
    Brainy
    April 18, 2021

    'type!{urn:com:appian:types:SSA}SSA_CustomerDetails'() acts like a function call and creates a new instance of your CDT data structure. If you use 'type!{urn:com:appian:types:SSA}SSA_CustomerDetails' without brackets, it means just the reference to the type. You can use that e.g. for type comparison. 

    rajuk0004Author
    Known Participant
    April 18, 2021

    thank you for response.