Task Default Custom Forms Collection | Community
Skip to main content
Level 9
October 2, 2020
Solved

Task Default Custom Forms Collection

  • October 2, 2020
  • 5 replies
  • 1096 views

I need to create a project view that has a column showing which tasks are listed in the "Task Default Custom Forms" section on the project. Is there a collection for that? I couldn't find anything in the API explorer.

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 DanPe1

Hi Adina,

Task Defaults is a referenceable object for the project object.

Within the Task Defaults object, the custom forms associated are listed as a collection (objectCategories).

Since the Original object you are reporting on is the Project, you can "reference" the Task Default object while referencing the custom form collection in two ways:

displayname=Default Categories

listdelimiter=<p>

listmethod=nested(taskDef).nested(objectCategories).lists

textmode=true

type=iterate

valuefield=category:name

valueformat=HTML

or

displayname=Default Categories

listdelimiter=<p>

listmethod=nested(taskDef.objectCategories).lists

textmode=true

type=iterate

valuefield=category:name

valueformat=HTML

5 replies

Doug_Den_Hoed_AtAppStore
Community Advisor
Community Advisor
October 2, 2020

Hi Adina,

I did some snooping in the API on this. Sections are called "Parameter Groups" internally, and although we think of them as "enclosing" the Parameters within a particular Section, technically, the Section is treated just like any other Parameter, ordinally positioned in the definition of the Category (e.g. as you drag Sections and Parameters up and down), and at run time, Workfront then interprets the Section as the logical divider we expect.

In other words, the 1:many you (and I) were expecting doesn't exist; so instead, you'd need to:

  • detect the "Task Default Custom Forms" section
  • note its ordinal number within the custom form definition (e.g. "1", if it was at the top)
  • detect the next section's ordinal number (e.g. "15", if there were 13 Parameters between them
  • detect the ordinal number of each parameter as it is encountered
  • if its ordinal number falls between those two section's ordinal numbers (e.g. "7"), show it (e.g. with a color, or an asterisk, etc.) as being "within" the section of interest; otherwise, don't

So, pretty icky....not to mention throwing multiple custom forms each with their own Default Custom Forms into the mix.

Perhaps you could leverage the new Parameter Label and manually put a * Prefix on the parameters you're interest in, by convention.

Regards,

Doug

AdinaPi1Author
Level 9
October 2, 2020

Here is a screenshot of the section I am talking about (it is not part of the custom form, but in the project details)

Doug_Den_Hoed_AtAppStore
Community Advisor
Community Advisor
October 2, 2020

Ah! That's quite different, Adina; but a shorter answer.

I suspect that would be found under the Queue objects somewhere in the API, and as such, doubt it would be natively reportable.

Regards,

Doug

DanPe1Accepted solution
Level 2
October 5, 2020

Hi Adina,

Task Defaults is a referenceable object for the project object.

Within the Task Defaults object, the custom forms associated are listed as a collection (objectCategories).

Since the Original object you are reporting on is the Project, you can "reference" the Task Default object while referencing the custom form collection in two ways:

displayname=Default Categories

listdelimiter=<p>

listmethod=nested(taskDef).nested(objectCategories).lists

textmode=true

type=iterate

valuefield=category:name

valueformat=HTML

or

displayname=Default Categories

listdelimiter=<p>

listmethod=nested(taskDef.objectCategories).lists

textmode=true

type=iterate

valuefield=category:name

valueformat=HTML

AdinaPi1Author
Level 9
October 5, 2020

Thanks Dan, this worked perfectly!