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

Query on using relations in BOM table which is parametric

SOLVED
Highlighted
Newbie

Query on using relations in BOM table which is parametric

Hi All,

 

My query is with reference to incorporating the relation in parametirc BOM table.

 

I'm working on assembly, which has close to 100 components, including the wire harness & hardwares. My BOM should call out for rpt.qty of each components, but for the wires i should show the qty in terms of total length of the wire, for ex 2 feet or so.

 

I tried to use IF relation to get it done, but couldn't succeed on it. I'm able to get the relations verified without any error, but when i try to evaluate the relations I'm not getting any result, it just shows error in output field (relation i used is given below in here for reference).

 

IF "asm_mbr_part_number" == "XXXX-001"

rpt_qty = "2FT"

ELSE

rpt_qty = rpt_qty

ENDIF

 

Any help is much appreciated...

 

Hope I'm able to make my query clear in here.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Query on using relations in BOM table which is parametric

I think you are on the right track, but there are just a couple of small changes you need to make.

1. Remove the quote marks from "asm_mbr_part_number"

2. You need to create a new variable to assign the quantity values to, you can't change rpt_qty (at least I don't think you can!). Call this new variable something like my_qty in the relation.

3. Because you want to use the units in the quantity variable (ie 2FT), it becomes a string variable, whereas the rpt_qty is an integer, so you need to convert that integer to a string when you add it to the my_qty variable, using the function itos().

So your relation should now become:

IF asm_mbr_part_number == "XXXX-001"

my_qty = "2FT"

ELSE

my_qty = itos(rpt_qty)

ENDIF

4. Change the report paramater in the table from rpt.qty to rpt.rel.my_qty.

And it should now work as you wanted. I hope this is a clear explanation, let me know if you have any more questions.


Disclaimer: I am not very familiar with using the cabling module, so there may be a better way to show what you want without using these relations, if anyone knows a better way please speak up!


David

View solution in original post

2 REPLIES 2
Highlighted

Re: Query on using relations in BOM table which is parametric

I think you are on the right track, but there are just a couple of small changes you need to make.

1. Remove the quote marks from "asm_mbr_part_number"

2. You need to create a new variable to assign the quantity values to, you can't change rpt_qty (at least I don't think you can!). Call this new variable something like my_qty in the relation.

3. Because you want to use the units in the quantity variable (ie 2FT), it becomes a string variable, whereas the rpt_qty is an integer, so you need to convert that integer to a string when you add it to the my_qty variable, using the function itos().

So your relation should now become:

IF asm_mbr_part_number == "XXXX-001"

my_qty = "2FT"

ELSE

my_qty = itos(rpt_qty)

ENDIF

4. Change the report paramater in the table from rpt.qty to rpt.rel.my_qty.

And it should now work as you wanted. I hope this is a clear explanation, let me know if you have any more questions.


Disclaimer: I am not very familiar with using the cabling module, so there may be a better way to show what you want without using these relations, if anyone knows a better way please speak up!


David

View solution in original post

Highlighted

Re: Query on using relations in BOM table which is parametric

Thanks David.

Your suggestions helped me to solve it...My day is blessed

Announcements