It's all about the answers!

Ask a question

#RPE #DNG How can I access a custom attribute with a custom data type from DNG with RPE?


Emely Pi (155) | asked May 17 '18, 7:02 a.m.
Hi,
I have created a custom attribute "Region of Markets" in DNG with a custom data type "t_region". Now I want to read out the values in RPE. I have tried to follow your last advise:  https://jazz.net/forum/questions/252825/rpe-dng-how-can-i-add-attributes-from-a-dng-module-to-the-data-source-schema-in-rpe . Unfortunately it did not work. I could not read out any of the content of my attribute "Region of Markets".

Thanks in advance!

Comments
Fariz Saracevic commented May 17 '18, 9:10 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

HI Emely,


Please do not open duplicate forum question but follow on the same thread:

This way context of your original question is lost and confuses everyone. If you follow link https://jazz.net/mystuff#tab=forum&page=questions, you can find all your forum questions. 

Accepted answer


permanent link
Subramanya Prasad Pilar (3.9k14) | answered May 17 '18, 9:25 a.m.
edited May 24 '18, 8:38 a.m.

The example provided works only for "String" data type. Depending on the attribute data type (t_region), you need to modify the data attribute used. What kind of value does "t_region" use? Is it Enumerated list of values? If so, you can use name (dataSource/artifact/collaboration/attributes/objectType/customAttribute/name) for filtering and literalName (dataSource/artifact/collaboration/attributes/objectType/customAttribute/literalName) for printing.

Emely Pi selected this answer as the correct answer

Comments
Emely Pi commented May 18 '18, 5:48 a.m.

t_region is defined as an enumerated list of values with base type integer from which one ore more values can be chosen. The labels of the values are printed in "Region of Markets". I need to read out these labels. So I would use as a condition itemId = "Region of Markets"?


Emely Pi commented May 24 '18, 4:39 a.m.

I have tried your suggested solution but I still can't access the custom attributes. There is nothing printed into my word document.


Emely Pi commented May 24 '18, 7:37 a.m.

I'm not sure how to get the itemID.


Subramanya Prasad Pilar commented May 24 '18, 8:45 a.m. | edited May 24 '18, 8:53 a.m.

You can refer the screenshot - the URL is what you use for configuring the "resources" data source.

For getting the "customer" attribute, I can either use the condition name == "customer" or itemId == "_ptWl4FktEeiEhdvG67fFHQ"

Here is the screenshot of RPE template:


Emely Pi commented May 24 '18, 9:01 a.m.

Thanks for the answer. Unfortunately filtering by name doesn't solve my problem. RPE still doesn't print my custom attribute into a word document.


Emely Pi commented May 24 '18, 9:09 a.m.

I've done it exactly as you have in the above screenshot of a RPE template. RPE still doesn't print the custom attribute.


Emely Pi commented May 24 '18, 11:43 a.m.

Ok, got it. I had to change the dsx file slightly. Thanks a lot!


Emely Pi commented May 24 '18, 11:43 a.m.

Ok, got it. I had to change the dsx file slightly. Thanks a lot!

showing 5 of 8 show 3 more comments

Your answer


Register or to post your answer.