Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Task report, primary assignment status in valueexpression.

Avatar

Level 2

*** WF newbie warning

I am trying to create a report that takes in primary assignment status into valueexpression.

It works as "valuefield=primaryAssignment:status", it doesn't work as "valueexpression={primaryAssignment}.{status}" - gets me blanks.

I don't why. Documentation on text mode reporting is very limited and I couldn't find any relevant examples or discussions.

I was trying to produce a custom status string for a task, based on values of task status (TS=NEW,INP,CPL) and primary assignment status (PA=AA,AD,DN).

Pseudo code:

If TS="New" and PA="Requested" --> CustomStatus="Submitted"

If TS="New" and PA="Working" --> CustomStatus="Reviewed/Waiting"

If TS="In Progress" and PA="Working" --> CustomStatus="Started"

If TS="Complete" and PA="Done" --> CustomStatus="Completed"

My plan was to concatenate {status} and {primaryAssignment}.{status} and use IF to produce a human friendly string.

If anyone can point me to how to make the {primaryAssignment}.{status} work, or why it doesn't work, I would appreciate.

Also, alternatives to produce custom status string based on task status and assignment status.

Thank you,

John

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies

Avatar

Community Advisor

hi, this doesn't answer your question entirely, but my guess would be that the "primary assignment" fields you're finding are some sort of short cut on Workfront's side to get at the correct information. I'm basing this guess on looking at the API Explorer task fields and noting that the primary assignment field (in the reference tab) goes to the Assignment section. We know that there can be multiple assignments in one task, so my guess is that the primary assignment is some sort of shortcut where Workfront accessing the collection of assignments and taking the primary details out of it.

As you've noted, you might have slightly less stellar results when you follow this shortcut.

Your pseudo code in your task report should therefore address this by calling on and staying wholly within the collection. It could look something like:

#harrypotterwand: I call on the collection of assignments. (wave your wand after calling it)

While in the collection: if the assignment isPrimary = true, and task status = X and the assignment status = Y, then Z

You would reference this article to call on collections in a View.

https://one.workfront.com/s/document-item?bundleId=the-new-workfront-experience&topicId=Content%2FRe...

You would write the valueexpression EXACTLY the way it looks within an assignment report. If it helps you to do so, I often create the assignment report, get the code working, and then copy the valueexpression into the collection of the task report. In other words, in an assignment report the task status is referred to as task:status or {task}.{status} so this is how you would refer to it in your valueexpression. All of the fields I mention above are in the API explorer in the assignment section, so you can reference syntax from there.