Get sys_communityname value

Hi,

We need to get sys_communityname of a content item to insert some tracking code for the third party product. Unfortunately, it doesn’t work with a community ID.

Community ID can be obtained with $sys.item.getProperty(“sys_communityid”).String. But, $sys.item.getProperty(“sys_communityname”).String doesn’t work. sys_communityname is listed as one of available system fields in a Display Format under UI Elements Design tab.

I think I’m using a wrong syntax to reach the field data, but cannot find a right one yet. I tried to get it as a parameter, but it didn’t work. Could anybody point me to the correct syntax?

Thank you,

Yukiko

Hi Yukiko,

Try

 $user.psoObjectFinder.getCommunityName(communityId)

from the PSO Toolkit.

-n

[QUOTE=yukiko;21128]Hi,

We need to get sys_communityname of a content item to insert some tracking code for the third party product. Unfortunately, it doesn’t work with a community ID.

Community ID can be obtained with $sys.item.getProperty(“sys_communityid”).String. But, $sys.item.getProperty(“sys_communityname”).String doesn’t work. sys_communityname is listed as one of available system fields in a Display Format under UI Elements Design tab.

I think I’m using a wrong syntax to reach the field data, but cannot find a right one yet. I tried to get it as a parameter, but it didn’t work. Could anybody point me to the correct syntax?

Thank you,

Yukiko[/QUOTE]