Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

Recalculating Expressions using fusion

Avatar

Level 3

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. 

1 Accepted Solution

Avatar

Correct answer by
Level 6

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? 

View solution in original post

7 Replies

Avatar

Level 6

@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)

Avatar

Level 3

Which Module would the following calculation live on?  

 

    • 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}

Avatar

Level 3

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?

 

Avatar

Correct answer by
Level 6

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?