It's all about the answers!

Ask a question

#RPE #DNG How can I access an empty attribute and replace it with "-"?


Emely Pi (1539) | asked Jun 04 '18, 8:12 a.m.
edited Jun 04 '18, 8:15 a.m.
Hi,
some values of my custom attribute are empty. I want to print for a blank attribute this: "-". But I have noticed that RPE skips or doesn't notice blank attributes. As such checking whether the string is empty or using _sessionLogger.info to print the values is not working.
Basically, I've tried every suggestion from: https://jazz.net/forum/questions/249786/dng-rpe-how-to-print-something-if-a-custom-attribute-is-blank but none are working for me.
How can I access a blank attribute and replace it with "-"?

Thanks in advance!

One answer



permanent link
Subramanya Prasad Pilar (4.6k16) | answered Jun 04 '18, 2:07 p.m.

 You can simply assign the custom attribute value to a variable (to which value is initialized to "-") and print the variable. Here is the screenshot of the snippet that prints the value of custom attribute named SPAttr:

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.