DNG-RPE: How to print something if a custom attribute is blank
![]() I have an attribute that has a unique identifier which was carried over from a previous requirements tool. I have figured out how to print that attribute correctly. What I want to do is, if that attribute is blank (for example if a new requirement is added without the attribute filled in) to print the DNG ID instead. I can't seem to figure out how to query on this. I have tried many many variations of 'if' statements for the following and nothing is working:
|
4 answers
![]() I believe you should check whether the string is empty or null, rather than whether it contains a particular substring. You can see this interesting discussion on the other forum..
|
![]() You can think of more than solution for this. One simple way is to store all name & values in a variable (_headersMap) and then print ReqProID value if exists or else print the identifier. You can try this Script Expression:
|
Comments
Ok, my problem now is that I don't know how to query on the existence of an attribute. So in DNG, the ReqProID attribute is left blank. In this case, this means that RPE doesn't 'see' that attribute, and I can't query on the value. How can I say, "if ReqProID doesn't exist, print the identifier'? Any suggestions?