내 커뮤니티 업적 표시줄을 확대합니다.

Don’t miss the Workfront AMA: System Smarts & Strategic Starts! Ask your questions about keeping Workfront running smoothly, planning enhancements, reporting, or adoption, and get practical insights from Adobe experts.
해결됨

Concatenate 2 values in the JSON Path field of a External Lookup Workfront field

Avatar

Level 4

Hi All,

I'm experimenting with External Lookup custom form fields in Workfront.

I wonder if there is a way to concatenate 2 (or more) values from the response of the external application so that they are both visible in the option list.

For example, if the external lookup returnes a JSON that includes both ID and name values, what would I put in the JSON Path field instead of $.data[*].name, to display e.g. "Name (ID)" as option in the drop down.

tibormolnar_0-1747304015094.png

This would be useful in situations where I have no control over the external app, i.e. I can't make the API to return concatenated values in the first place (e.g. if the external URL points to the Workfront API).

Thank you for your input.

Tibor

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi Tibor,

I think JSON path don't have such functionality. For external lookup other Workfront areas I used what I think you might have already tried, a custom calculated field that would contain required concatenation.

Good luck!

Rafal

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi Tibor,

I think JSON path don't have such functionality. For external lookup other Workfront areas I used what I think you might have already tried, a custom calculated field that would contain required concatenation.

Good luck!

Rafal

Avatar

Level 3

I have played with this some and I can get close. Maybe someone can pick it up from here and get the rest of the way there. 

If I put this in the JSON path, I get the full list of the first element concatenated with the full list of the second element.

 

$.concat($.data[*].name,' ',$.data[*].ID)

 

so I get, name1name2name3 ID1ID2ID3

 

I have tried several different ways of rearranging to get the concatenation to apply to each element, but I haven't gotten there quite yet. I would love for a JSON Path expert to find my glitch and get this working, because I could use it, too. I have tried $.data.name,  .name, data[*].concat(.name,'  ',.ID) and several others. No luck yet, but I'm not giving up.

Avatar

Level 4

Hi @VynetaRy thank you for your efforts.

Let's hope someone with more extensive Json knowledge can pick this up.

Tibor