cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Zero QTY Relation

TerryMcFall
1-Newbie

Zero QTY Relation

I have an automatic BOM drawing table that will generate an qty of zero. I'd like to write a relation that will display the text string "REF" in place of zero qty.

Is this an easy thing to do or am I asking for the moon? Can anyone recommend a good resource to learn about relations? The tutorial on ptc.com is pretty brief.

Thanks,
-Ter

Terrence McFall
CAD Systems Administrator
Varian Medical Systems
Palo Alto, CA USA

650-424-6039 desk
650-799-0179 cell


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
1 REPLY 1
TomU
23-Emerald IV
(To:TerryMcFall)

Best resource is probably the help documentation. This is actually pretty straight forward. You simply check for the value you want (in this case zero), then set a second parameter equal to it or to something else when that value is found. Just make sure you change your table cell to look at this new parameter instead of the original quantity. (&rpt.rel.QTY2)

IF rpt_qty == 0
QTY2 = "REF"
ELSE
QTY2 = rpt_qty
ENDIF

It also is helpful to use the "IF EXISTS" function anytime you aren't 100% certain the parameter will always exist. Here is a sample from a different thread:
Top Tags