It's all about the answers!

Ask a question

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


Emely Pi (155) | 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 (3.4k14) | 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.