Post

1 follower Follow
0
Avatar

Wildcards and Customer Actions

I created a customer action in v6 for renaming tasks. However this action would be much more useful if I could use wildcards in the user provided text.

 

Rhonda Mandeville Answered

Please sign in to leave a comment.

4 comments

0
Avatar

Can you provide a specific example of the use case for this action?

Josh Santos 0 votes
Comment actions Permalink
0
Avatar

I have a template that has several tasks with the first part of the name is unique to the project and the other part is unique to the task. I.e. <Book Title> Manuscript; <Book Title> CR1; <Book Title> ER1; <Book Title> CR2; <Book Title> ER2; <Book Title> to Press. After creating a project from the template, I want to be able to find <Book Title> and replace it with the actual book being published.  I got the find and replace Custom Action to work yesterday but it replace the whole task name with the book name and dropped the task specific part of the task name. I ended up with all the tasks of my project had the same name. I would like to do Find: <Book Title>* and Replace with: Charlotte's Web* so it will keep the manuscript, CR1, ER1 etc. of the original task.

Rhonda Mandeville 0 votes
Comment actions Permalink
0
Avatar

Actually, it looks like we can achieve this.  I was helping Rhonda with this customization on yesterday's webinar - thanks for expanding on the requirements.  I just tried altering what I suggested, and it seems to meet the requirements.  What you'll want to do is replace the "Update Field" section in which you are changing the $WorkItems.Name with the following:

ReplaceWith + Right(TargetObject.Name,Len(TargetObject.Name)-Len(Find))

For anyone else monitoring this thread that wants to install this application on their account, here is a direct link: https://app2.clarizen.com/Clarizen/View/Default.aspx?id=9381e817-e0a9-4991-a206-d69d8e2375c6&type=Published+Application&ver=v6

Rhonda, I hope this answers the question.  Let us know!

Rob

Yoko Suzuki 0 votes
Comment actions Permalink
0
Avatar

Thanks Rob:) I just tested it and it works perfectly.  I appreciate the extra follow up.

Rhonda Mandeville 0 votes
Comment actions Permalink