Skip to main content
1-Visitor
July 30, 2015
Solved

Relation in BOM with BULK ITEM

  • July 30, 2015
  • 5 replies
  • 2025 views

Hello All,

 

I am having an issue with a repeat region using a Unit of Measure type output. As of now my code is the following:

 

if asm_mbr_type=="BULK ITEM"

UNIT_MEASURE=asm_mbr_units

else

UNIT_MEASURE="EA"

endif

 

I want only the bulk items to pull from their parameter UNITS and the rest read EA. All other line items in the BOM populate EA, however the one bulk item blanks out. Once I pull asm_mbr_units out of the relation and replace it with FT, everything propagates correctly. Any ideas as to why the relation cannot find the BULK ITEM parameter?

 

 

Thank you!

CC


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.
Best answer by ccates

I actually finally figured it out. When you are reading a parameter from a member in this case the parameter must exist within the table parameters as well. So:

if asm_mbr_type=="BULK ITEM"

UNIT_MEASURE=asm_mbr_units

else

UNIT_MEASURE="EA"

endif

UNITS parameter must exist within the Assembly Member and UNITS must exist within the Table.

5 replies

12-Amethyst
July 30, 2015

Did you change your bom column to report "unit_measure"

upon further examination, the script should be:

UNIT_MEASURE=asm_mbr_units

if asm_mbr_type=="BULK ITEM"

UNIT_MEASURE="EA"

endif

ccates1-VisitorAuthor
1-Visitor
July 30, 2015

Yes, the parameter populating that column is UNIT_MEASURE. It is embedded in the Table parameters. So the column reads,

&rpt.rel.UNIT_MEASURE

That does not solve the issue. I want types that are component or assembly to populate EA in the repeat region.

IF the member type is a BULK ITEM, i want the UNIT_MEASURE parameter in the table to read the UNITS parameter in the BULK ITEM.

12-Amethyst
July 30, 2015

several questions:

did you adjust your relation as I noted?

If yes, is it still failing?

if yes, are your parameter units the same - ie: is a string type?

ron

Chris3
21-Topaz I
July 30, 2015

Try this

UNIT_MEASURE="EA"

if asm_mbr_type=="BULK ITEM"

if exists(asm_mbr_units)

UNIT_MEASURE=asm_mbr_units

endif

endif

ccates1-VisitorAuthorAnswer
1-Visitor
July 30, 2015

I actually finally figured it out. When you are reading a parameter from a member in this case the parameter must exist within the table parameters as well. So:

if asm_mbr_type=="BULK ITEM"

UNIT_MEASURE=asm_mbr_units

else

UNIT_MEASURE="EA"

endif

UNITS parameter must exist within the Assembly Member and UNITS must exist within the Table.