I tried every combination I can from API Explorer but nothing seems to pull in data, PLEASE ANY IDEAS ?
displayname=Risk Type & Desc
listdelimiter=<div>
listmethod=nested(risk).lists
textmode=true
type=iterate
valueexpression=CONCAT("* ",{risk}.{riskTypeID},", ",{risk}.{description})
valueformat=HTML
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
This should do it:
displayname=Risk Type & Desc
listdelimiter=<div>
listmethod=nested(risks).lists
textmode=true
type=iterate
valueexpression=CONCAT("* ",{riskTypeID},", ",{description})
valueformat=HTML
However, i'm not sure why you would want the riskTypeID as this just returns a 32 character ID that wont mean anything to anyone. Did you mean riskType.name? If so, this would work:
displayname=Risk Type & Desc
listdelimiter=<div>
listmethod=nested(risks).lists
textmode=true
type=iterate
valueexpression=CONCAT("* ",{riskType}.{name},", ",{description})
valueformat=HTML
You were very close. There were a just a couple of issues with your code. in listmethod, you need to use "risks" instead of "risk" because "risks" is the name of the collection in the API explorer. Then for description and riskTypeID in your value expression, there was no need to have {risk} appear before {riskTypeID} and {description}. Workfront already knows you are referencing the risk dataset because we've specified that as the collection in listmethod. . . . If that makes sense.
Hope that helps!
Best Regards,
Rich.
Hi,
This should do it:
displayname=Risk Type & Desc
listdelimiter=<div>
listmethod=nested(risks).lists
textmode=true
type=iterate
valueexpression=CONCAT("* ",{riskTypeID},", ",{description})
valueformat=HTML
However, i'm not sure why you would want the riskTypeID as this just returns a 32 character ID that wont mean anything to anyone. Did you mean riskType.name? If so, this would work:
displayname=Risk Type & Desc
listdelimiter=<div>
listmethod=nested(risks).lists
textmode=true
type=iterate
valueexpression=CONCAT("* ",{riskType}.{name},", ",{description})
valueformat=HTML
You were very close. There were a just a couple of issues with your code. in listmethod, you need to use "risks" instead of "risk" because "risks" is the name of the collection in the API explorer. Then for description and riskTypeID in your value expression, there was no need to have {risk} appear before {riskTypeID} and {description}. Workfront already knows you are referencing the risk dataset because we've specified that as the collection in listmethod. . . . If that makes sense.
Hope that helps!
Best Regards,
Rich.
THANK YOU!
THANK YOU!
I have been banging my head for days with this one.
2 questions
1. What happens if there is like 4 risks, will they all appear?
2. Is the a training class you can recommend for writing CAML code for TextMode?
Tom
Views
Replies
Total Likes
Glad I could help, Tom.
Yes, this code will return all risks entered on a project.
The advanced reporting courses on experience league are really helpful, you can find them here. They don't cover everything, but it's a good place to start.
It's really all about practice, patience, and more practice
I had no idea they put the reporting videos up. Then again, I haven't looked for a while
Views
Replies
Total Likes
There's no training class for it but it does help if you understand some javascript and how to write Excel formulas. Most of textmode follows standard scripting syntax. It helps to pick apart code you can find here in the forums. If you need explaining, ChatGPT is your friend. In ChatGPT, you can write "Explain: " and then paste the code you found here. It will pick apart the code and do a decent job of explaining it. Do not ask ChatGPT to write your code from scratch, it is a lesson in futility. Trust me on this.
Thank you again! Much Appreciated!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies