Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
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
Solved! Go to Solution.
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.
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
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
Try this
UNIT_MEASURE="EA"
if asm_mbr_type=="BULK ITEM"
if exists(asm_mbr_units)
UNIT_MEASURE=asm_mbr_units
endif
endif
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.