Use Case
working on my deep copy function. Just need to copy the current value of a single-select field from a source task to a target task in a js automationm script.
Vars
Database - source/target space/database: ‘Test/Task’
fieldname - name of the single-select field: ‘Task Type’
fieldValueSource - the Task Type object in fieldName:
{ Id: ‘e3b3f211-0e44-11ee-830c-6d1d3c8b35f0’, Name: ‘TASK’ }
entityTarget - the target Task entity
Question
Could someone pls provide the correct syntax to update entityTarget with the Task Type from fieldValueSource?
Note
I have spent hours trying to get this to work. In Scripts and Automation there is a list of functions. I think it would be very useful to the community if this could be expanded to include syntax and examples.
typeName = full name of database, e.g. “Space/Database” entityId = UUID of entity to be updated, e.g. “3bba5590-fee4-11ee-b169-d12157290ac4” fieldName = name of field, e.g. “Task Type” fieldValue = select option to be chosen, e.g. “Task”
In general, the tooltips will show you the syntax for a function as you start typing, and some explanation.