How do I assign the value of a custom Contributor attribute in RTC to a variable in RPE?
![](http://jazz.net/_images/myphoto/c55ae22c90c873ab31a58a46347d6f91.jpg)
I have only been able to find contributor data in two places:
- /workitem/contributor/
- /foundation/contributor/contributor/
- /workitem/workItem/allExtensions
- Filter on key ( key == <attribute_id>)
- Assign <helpId> ( helpId = /workitem/workItem/allExtensions/helperId )
- /workitem/workItem/itemExtensions
- /workitem/workItem/itemExtensions/value
- Filter on <helpId> (<itemExtensions/helperId> == helpId)
- Assign <myItemId> ( myItemId = /workitem/workItem/itemExtensions/value/itemId )
- Note: there is also a ‘reportableUrl’ field here, but when I try the link directly in the browser I get an invalid object error.
- There is not a smallString or DisplayValue here that contains the contributor data
- /workitem/contributor
- Filter on <myItemId> ( /workitem/contributor/itemId == myItemId )
- Assign <myName> ( myName = /workitem/contributor/name )
Accepted answer
![](http://jazz.net/_images/myphoto/c55ae22c90c873ab31a58a46347d6f91.jpg)
You can either use the query workitem/workItem/itemExtensions or workitem/workItem/allExtensions. If you are using the query workitem/workItem/itemExtensions, workitem/workItem/itemExtensions/value/itemId will give the itemId for the contributor, that can be used in the (native) filter for the 2nd request. For the Data Source Configuration, you can set URI property that evaluates to https://server:port/ccm/rpt/repository/foundation
Another option s to use Special Attribute in RPE that can fetch the value based on the matching key.
Note: You may need to update the schema (use Replace Schema option in RPE) if you do not find "itemValue" node under allExtensions. In this example, I am retrieving "Tester" value for the work item.
Comments
![](http://jazz.net/_images/myphoto/dbe94a27c372fd9d8fa482d274c8da80.jpg)
Please note that workitem/workItem/itemExtensions/value/reportableUrl is like https://<server>:<port>/ccm/rpt/repository/workitem/contributor/itemId/<ItemId>. We need to replace "/workitem" with "/foundation". If you are using filter in RPE template, only https://server:port/ccm/rpt/repository/foundationcan be set as the URI for the foundation data source.
![](http://jazz.net/_images/myphoto/c55ae22c90c873ab31a58a46347d6f91.jpg)
Thank you for your reply! This answer got me to successfully generating the report.
The only issue I have now is that, even though I configure the foundation data source in the report, and the data source is marked "hidden," It is still requiring a URL at runtime. I have worked around this for now by configuring the foundation URI in the metadata configuration for the data source, so that users don't have to enter it. I would still rather not have the foundation data source configuration visible to users, is there any trick besides marking it as "hidden" and having it dynamically configured that needs to be done so that it doesn't ask to be configured at run time?
![](http://jazz.net/_images/myphoto/dbe94a27c372fd9d8fa482d274c8da80.jpg)
You can of course hide the foundation data source. Are you generating document through RPE Launcher or RTC? Since the data source name "RTC Foundation" starts with "", it should be hidden from RTC report wizard. In RPE, you need to set "Configuration required" property to "hidden" so that it will be hidden.
You can also use
_sessionInfo.getDatasourceProperty("RTC Workitems","URI", " ") to get the URI of "RTC Workitems" data source and modify it using Script Expression and set it to "_RTC Foundation".