Hello everyone.
I am facing some problems when trying to acess property of a custom object inside the RunActions() formula.
Context: I made a pack that return an object with several properties (defined in a schema). With these values I want to setup several controlValues, and for that I am trying to use RunActions().
The schema is this one:
const ProjectSchema = coda.makeObjectSchema({
properties: {
name: { type: coda.ValueType.String},
ctpName: {type: coda.ValueType.String},
ctpEmail: {type: coda.ValueType.String},
status : { type: coda.ValueType.String, codaType: coda.ValueHintType.SelectList},
mainCompany: {type: coda.ValueType.String},
partnerCompany: {type: coda.ValueType.Array, items: {type: coda.ValueType.String, codaType: coda.ValueHintType.SelectList}},
promotion: {type: coda.ValueType.String}
},
displayProperty: ‘name’,
});
And if the button formula is this, the control is set:
But, if I wrap the SetControlValue() in a RunActions, the action return a error that the “Name” property could not be found.
A working around is to return the object as a string and access the properties with parseJSON formula, but it would be better if I can access directly.
Am I doing something wrong?
Thank you everyone