Expand my Community achievements bar.

The next phase for Workfront Community ideas is coming soon. Learn all about it in our blog!

Ampersand in a custom prompt

Avatar

Level 7
Hello my friends... I am trying to create a custom prompt for a portfolio which uses an ampersand in the naming convention. This will not work due the fact the "&" is used to join your statements in the condition field. Has any one come across this and is there a way around this? Brandon Pritchard System Administrator iNHouse Marketing - Nationwide pritcb1@nationwide.com
10 Replies

Avatar

Level 10
I haven't tried this, but have you tried renaming the portfolio without the ampersand, coding the prompt, and then renaming it back? (would the prompt still work?) Or if you give me your coding I'll test it in my sandbox. -skye

Avatar

Level 10
Also... it's been a while, but can't you code it using the GUID? -skye

Avatar

Level 10
We had issues in the API with the ampersand in names. We did code around it. But I don't know the details. I've copied one of our developers to see if he can provide the answer to what we did. Kevin do you know how Eric coded around the & in the API?

Avatar

Level 2
Brandon, can you explain to me what you mean by trying to create a custom prompt? Are doing this from within Workfront, or are you talking about in a custom API code? Thanks, Kevin Kevin Jesik Denver Board of Water Commissioners

Avatar

Level 7
Appreciate the quick replies guys. Skye - The GUID is great idea and I haven't thought of that, but....(there is always a but)...This is an issue report which means we have to choose the portfolio from a custom field. The issue's parent project is just the queue and does not have a portfolio attached. Therefore, I have the prompt pointing back to the field rather than the actual portfolio object, if that makes sense. Kevin - I am in WF creating a new issue report. I want to filter on a particular field we use in the custom form. I am setting up custom prompts for the report so our leaders don't have to manually switch the filters each time they want to see a different marketing org. This works for all of our mkt org's except two b/c they have an ampersand in the naming convention. The condition for the prompt is "DE:Marketing Organization=Property & Casualty". I can make this work if I swap out the "&" with "and", but I'd rather keep the ampersand for consistency. I don't know if solution you have for the API call would work or not in this environment. Let me know if you need further explanation. Brandon Pritchard System Administrator iNHouse Marketing - Nationwide pritcb1@nationwide.com

Avatar

Level 5
Try putting a \ in front of the & to escape out the character. So Property \& Casualty You can also try using single or double quotes around the phrase. Single quotes usually tell a compiler to not translate the string. But best practice is to avoid using punctuation of any kind in field names Melinda Layten Technical Project Manager - API and Integration Workfront

Avatar

Level 7
no go Melinda. This one has got me perplexed. We do have WF onsite next week and maybe I'll get them to take a look at it. There has to be a way to make this work!! :) we've tried: & /& \& &' || ' single quotes on phrase and & double quotes on phrase and & My brain is now mush. Brandon Pritchard System Administrator iNHouse Marketing - Nationwide pritcb1@nationwide.com

Avatar

Level 7
in case you guys were wondering.....the fix is this line here: &Field Name_Mod=soundex We are pulling "Property & Casualty" from a calc'd field named "Marketing Organization". So the condition reads as: DE:Marketing Organization=Property Casualty&DE:Marketing Organization_Mod=soundex It acts as sort of a wild card search and pulls in anything containing the value "property casualty". This was a tough one, appreciate your help guys! Brandon Pritchard System Administrator iNHouse Marketing - Nationwide pritcb1@nationwide.com

Avatar

Level 2

I realize this is 2 years old, but just wanted to thank you for following up with the solution. I ran into this exact scenario today, just with a different marketing organization name!

Avatar

Level 7

That is great to hear Harry! We still have issues with this in some of our automations, but for custom prompts this still seems to be the solution.