Recalculating Expressions using fusion | Community
Skip to main content
Level 4
October 23, 2024
Solved

Recalculating Expressions using fusion

  • October 23, 2024
  • 1 reply
  • 1277 views

Hi All,  I'm trying to create a fusion scenario that looks for children tasks missing a particular calculated field then attaches a form that carries that field to the task. 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sven-iX

Currently this is what I have:

 

Mod 1

Task Search

record type: Task

all matching records

search criteria

name = exist

and

calculated field name = does not exist

and 

Number of children = 0

 

Mod 2

record type = Task

Action = calculateDataExtension

ID = 1.ID

 

Mod 3 (couldn't combine with Mod 2)

record type = task

action = assignCategories

objID = 1.ID

objCode = 1. objCode

categoryIDs = form number code

 

Mod 4 

record type = Task

Attach Custom Form = Form Name

 

what steps am I missing?

 


Oh - You're starting the scenario with an search - excellent that gets around the exists issue. So you can ignore that. 

 

  • Mod 1 = Task search: If you're getting the expected result set all good here
  • Mod 2 = is there a reason you need to call a recalc? Otherwise you can remove
  • Mod3 = assign form looks good
  • Mod 4 not needed since you're doing that with Mod 3

 

So Mod 1 + Mod 3 should get you what you describe? 

1 reply

Sven-iX
Community Advisor
Community Advisor
October 23, 2024

@omahaomaha sounds good. What do you need help with? 

 

Your title is about recalculating expressions, but your post mentions attaching a missing form... 

 

  1. you recalculate expressions on an object using the Workfront MiscActions module and selecting calculateDataExtension
  2. you attach a form using the same MiscActions module and selecting assignCategories
    1. objID = the ID of the object to add forms to
    2. objCode = the object type to which you're adding categories, in your case TASK
  3. you find child tasks that are missing a particular form (the one you'd add if missing)
    • EXISTS:a:$$EXISTSMOD=NOTEXISTS
    • EXISTS:a:$$OBJCODE=OBJCAT
    • EXISTS:a:objID=FIELD:ID
    • EXISTS:a:category:name={name of the form}
    • numberOfChildren=0

You can also use EXISTS:a:categoryID={ID of the form}

 

The reason you have to go match on the Form or Category is that there are too many objects in the chain to say "a task that is missing a field": The hierarchy is below - too many hops to traverse.

 

  1. object (here, TASK)
    1. objectCategory[ ] (an array of linking objects that have no data, just the IDs of the task and category)
      1. category
        1. categoryParameters[ ] (array of linking objects)
          1. parameter (field)
Level 4
October 23, 2024

would the record type be Task?

Sven-iX
Community Advisor
Community Advisor
October 23, 2024

If you're searching for tasks, yes.