×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

BOM Relations

BOM Relations

BOM Relations

(OP)
Okay, I've been going at this for hours now and I’m having no luck. Hopefully someone on here has had a similar issue and can help…

[Background Info]
We add “_bulk” to bulk item part numbers to differentiate them from actual parts.
For example, if we have part number “AB1234” the bulk item version of this (if necessary) is “AB1234_BULK”

[Issue]
The issue is when populating the BOM, “AB1234_BULK” appears as the part number (asm.mbr.name) for the bulk items and we only want it to display “AB1234”.

I created a relation in the bulk part itself which creates a parameter that truncates anything containing “_bulk”. So, out of the box, the bulk item “AB1234_BULK” contains a parameter named “bulkname” that automatically generates the value “AB1234”.

Next, in the assembly BOM relations, I simply want to write a relation that replaces “asm_mbr_name” with “asm_mbr_bulkname” whenever it sees “_bulk” as a value. Is this possible?

Currently, my BOM relations are as follows:

if asm_mbr_name=="_bulk"
asm_mbr_name=asm_mbr_bulkname
else
asm_mbr_name=asm_mbr_name
endif

But, I get absolutely no change to the BOM when doing this, or when trying anything for that matter... it just stays the same as if I did nothing.
Is there a symbol for “contains” as opposed to “equal to”?
How would I go about this?

I am a novice at relations so the more in layman's terms he better.
Thanks in advance.

RE: BOM Relations

You are looking for a name that equals '_bulk' when you need to be looking for a substring of name that contains '_bulk'.

slen=string_length(asm_mbr_name)
if extract(asm_mbr_name,slen-5,slen)=="_bulk"
asm_mbr_name=asm_mbr_bulkname
else
asm_mbr_name=asm_mbr_name
endif

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: BOM Relations

(OP)
I tried this but it doesn't seem to do anything.
It comes up with "Probable error in function evaluation"

Can you explain to me what the -5 means in the code? I don't get what line 2 is actually saying.

RE: BOM Relations

(OP)
Okay here's what I ended up doing with the BOM relations and it seems to work... I added a column to the BOM table, asm_mbr_type and used the following relation:

IF asm_mbr_type=="BULK ITEM"
pnreport=asm_mbr_bulkname
ELSE
pnreport=asm_mbr_name
ENDIF

and then I deleted the asm_mbr_type column from the BOM table and it seems to work out. Will this hold?

Now, my new problem is this in the actual bulk item relations...
We have some bulk items that are the regular part number, for example, "AB1234", and some that have the suffix "_bulk" added, example, "AB1234_BULK".
I didn't realize this before but by adding the relation that generates the parameter "bulkname" in the bulk part, it only works for the items that have the "_bulk".
For instance, my current relation in the bulk items is this....

bulkname = extract(rel_model_name,1, (search(rel_model_name, "_")-1))

So, for example, bulk item part number "AB1234_BULK" with the above relation will produce a parameter named "bulkname" with the value of "AB1234". This did exactly what I wanted it to do so I can use this "bulkname" parameter in the assembly BOM relations.
The problem is, this same relation added to bulk item part number "AB1234" will produce the same "bulkname" parameter with an empty value, thus producing an empty field in the assembly BOM table.

I feel like there has to be a fairly easy way to write a relation to make the "bulkname" parameter report "AB1234" regardless if the model name is AB1234 or AB1234_BULK, I just don't know how to do it... but I feel like the relation you wrote in your reply was similar to what I would need to do... I just cannot figure it out.

RE: BOM Relations

Find the length of the asm_mbr_name string
slen=string_length(asm_mbr_name)
If the part name is abc12345_bulk then slen will equal 12

Determine if the part name ends in '_bulk'
if extract(asm_mbr_name,slen-5,5)=="_bulk"
Compare the last 5 characters of the asm_mbr_name string to see if they equal '_bulk'
Extract takes a string (asm_mbr_name) and pulls out charcaters specified by a starting point (slen-5) and the number of characters you want.
The 5 comes from the length of the string we want to find (_bulk) which we need to subtract from the full string length (slen).

I had a mistake in my original post. See the IF line in my explaination above for the proper format.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: BOM Relations

What we do is to have a separate parameter called model_name. In our standard parts and start part, there is a relation model_name=rel_model_name. For your bulk items, you can have the relation you use above.
Then in the BOM, you use the model_name parameter - this format works for multiple applications, because it is BOM independant.

RE: BOM Relations

We don't identify bulk items with a special part name so they just go in.

"Wildfires are dangerous, hard to control, and economically catastrophic."

Ben Loosli

RE: BOM Relations

(OP)
Thanks for all the help everyone.

What I ended up doing was using a user defined report symbol in the BOM part number column (rpt.rel.pnreport) as opposed to the standard asm.mbr.name.
From here, I created a relation in the repeat region as follows:

pnreport=extract(asm_mbr_name,1,6)

This basically cuts all part numbers down to only show the first through sixth character, which solves the problem for us here as all of our part numbers are 6 characters.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources