Expand my Community achievements bar.

Adobe Summit is live! Tune in to take part in the premier digital experience event.
SOLVED

Posting An Update of a Projects Milestone Dates (In Order of Planned Completion)

Avatar

Level 4

Hello,

 

I am building a scenario that when a project is made active it will post an update on said project of the project's Milestone schedule.

 

So far my trigger works fine and I can pull a collection of tasks, filtering down for only Milestones. Where I am caught is how to take those bundles of Milestones and format it (in a variable?) such that it sorts the planned completion dates of all the Milestones.

 

Any guidance would be greatly appreciated, thank you!

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Eric_D_Miller 

You now have a "list of all of the Milestones in ascending order" - right? Like, the data and order are correct?
What to do next depends on what you're doing with the data. 
Do you want a chunk of text that shows name-date in asc order? 

What is happening to the data next? 

 

Going back to your original post, it sounds like you want a blob so you can create an update on the project.

In that case I'd use an iterator followed by a text aggregator.

 

The iterator takes the array "milestone list" as input, and in the text aggregator: 

  • check advanced options
  • select "new line" as row separator
  • in the bottom text field select the name and data from the iterator
  • slap a formatDate around the {date} value : formatDate( {date}; MM/DD)

 

 

View solution in original post

10 Replies

Avatar

Community Advisor

You can 

  • in the search for tasks, use CustomAPI call
  • under query string add milestoneID_Mod=notblank
  • under fields, add plannedCompletionDate

This gets you a body.data array of milestone tasks. you can then sort it sort ( X.body.data ; plannedCompletionDate )

Avatar

Level 4

Sven,

I used the below and got the displayed output:

Eric_D_Miller_0-1741612166064.png

Eric_D_Miller_1-1741612224424.png

 

My intended output is a list of all of the Milestones in ascending order, displayed as MM/DD, but I seem to lose my data when I try to add map() or formatDate() to my variable. Is that the correct function to use in this case?

Avatar

Correct answer by
Community Advisor

Hi @Eric_D_Miller 

You now have a "list of all of the Milestones in ascending order" - right? Like, the data and order are correct?
What to do next depends on what you're doing with the data. 
Do you want a chunk of text that shows name-date in asc order? 

What is happening to the data next? 

 

Going back to your original post, it sounds like you want a blob so you can create an update on the project.

In that case I'd use an iterator followed by a text aggregator.

 

The iterator takes the array "milestone list" as input, and in the text aggregator: 

  • check advanced options
  • select "new line" as row separator
  • in the bottom text field select the name and data from the iterator
  • slap a formatDate around the {date} value : formatDate( {date}; MM/DD)

 

 

Avatar

Level 4

Thanks Sven!

This got me what I was looking for.

 

Any tips on adding special formatting to the fields? Specifically adding bold lettering.

Avatar

Community Advisor

Use HTML <b> tags, then use the Draft.js Module to convert the HTML to JSON, and put the JSON into the RTF field. 

I haven't used that myself but 2nd hand reporting says it works (unless you make very complicated HTML)

 

simple stuff like bolding should be fine. 

Avatar

Level 4

Does the RTF live in the Create Record/Update module?

This was the result I got:

Eric_D_Miller_0-1741953500815.png

 

Avatar

Community Advisor

Argh I misled you, I apologize. Remove the Draft.js.

Try creating a NOTE, and put your HTML into the html field. 

If that fails, we can dig into the richTextNote idea. 

Avatar

Level 4

Amazing Sven, you got it right! You are too helpful.


I have one last question, formatting the time to be AM/PM rather than military time.

Is this possible?

Avatar

Community Advisor

Avatar

Level 4

Wonderful, thank you very much Sven.