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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

BOM Relations using equal equal YES NO Parameter

davehaigh
11-Garnet

BOM Relations using equal equal YES NO Parameter

I have a guy that’s playing around with adding some new parameters to COTS parts to have the BOM table display different parameters for those specific parts.

 

I have the BOM table relations displaying the results the way he wants them, but not using the logic he wants. He wants to use a YES NO parameter to determine what gets displayed in the BOM table.

I just can’t get that to work. And yes all the parameters displayed and not displayed in the table are in the Local Parameters when editing the table relations, so that’s not the issue.

 

Here is what works:

This displays both the normal parts without the added COTS parameters and the COTS parts

 

/* RELATIONS FOR PART NO COLUMN

new_part_no="MISSING PARAMETER"

 

if exists("asm_mbr_bom_part_no")

new_part_no=asm_mbr_bom_part_no

endif

 

if exists("asm_mbr_part_number")

new_part_no=asm_mbr_part_number

endif

 

if exists("asm_mbr_vendor_part_no")

new_part_no=asm_mbr_vendor_part_no

endif

 

 

What he wants the logic to look like is something like this:

This will not display the part number for the normal parts that don’t have the COTS Yes/No parameter.

 

/* RELATIONS FOR PART NO COLUMN

new_part_no="MISSING PARAMETER"

 

 

if exists("asm_mbr_bom_part_no")

new_part_no=asm_mbr_bom_part_no

endif

 

 

if exists("asm_mbr_part_number")

new_part_no=asm_mbr_part_number

endif

 

IF asm_mbr_cots == "YES"

new_part_no=asm_mbr_vendor_part_no

endif

 

 

What he actually sent me was this:

This will not display any field other than the item number for the non-COTS part.

 

IF asm_mbr_cots == "YES"

new_part_no=asm_mbr_vendor_part_no

ELSE

if exists("asm_mbr_bom_part_no")

new_part_no=asm_mbr_bom_part_no

endif

ENDIF

2 REPLIES 2
BenLoosli
23-Emerald II
(To:davehaigh)

Can you upload a sample file with parts?

Hi,

I am not sure whether I understand your description well, therefore I only guess that, when the condition in 1st IF command is TRUE then you want to skip 2nd and 3rd IF command. I suggest you to use following relations:

/* RELATIONS FOR PART NO COLUMN
new_part_no="MISSING PARAMETER"
new_part_no_set=0

IF exists("asm_mbr_bom_part_no")
  new_part_no=asm_mbr_bom_part_no
  new_part_no_set=1
ENDIF

IF new_part_no_set==0 & exists("asm_mbr_part_number")
  new_part_no=asm_mbr_part_number
  new_part_no_set=1
ENDIF

IF new_part_no_set==0 & asm_mbr_cots == "YES"
  new_part_no=asm_mbr_vendor_part_no
  new_part_no_set=1
ENDIF

Martin Hanák
Top Tags