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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Relation in BOM with BULK ITEM

ccates
1-Newbie

Relation in BOM with BULK ITEM

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.
1 ACCEPTED SOLUTION

Accepted Solutions
ccates
1-Newbie
(To: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.

View solution in original post

5 REPLIES 5

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

ccates
1-Newbie
(To:ccates)

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.

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
20-Turquoise
(To:ccates)

Try this

UNIT_MEASURE="EA"

if asm_mbr_type=="BULK ITEM"

if exists(asm_mbr_units)

UNIT_MEASURE=asm_mbr_units

endif

endif

ccates
1-Newbie
(To: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.

Top Tags