Missing VALUE in schematic sourced BOM

In my project, when I create a BOM from the schematic, some of the entries have a blank VALUE field. There are 2 adjacent device entries in the BOM, one with a VALUE and one with a blank.

Both devices (2N7002 and AORN21307) have near identical library structures and both display a value on the schematic, but only the 2N7002 has a VALUE entry in the BOM.

Screen capture images are shown below.

Any ideas ???. All I can think of is that the sequences used to create the library parts an the schematics may have been different for each device, but I always updated the library after any changes.

I have tried deleting an reentering VALUE data but no good.

Its not a showstopper as I can manually edit the BOM, but is a niggle.

Any help gratefully accepted … Tom

Hi

First, please do not define attributes called VALUE. VALUE is a built-in attribute, the content of the marked text field:

So basically you created a recursive call with VALUE inside the value, and the additional attribute is kind of illegal. To be honest, I’m not 100% sure what LibrePCB does in this case – maybe everything is ok anyway but it’s still better not to do it. Just use MPN, DEVICE etc. within the value field but no manually added attribute as you don’t need it.

However, I think this was not the reason for your issue. Somehow it looks like your device (Q2) is not placed in your board, or am I wrong?

Any MPN or DEVICE attribute is indirectly related to a board (because they could differ between multiple boards) so the VALUE in the end is empty if the device is not on a board. If you export the BOM from the board editor (instead of the schematic), Q2 will be missing entirely. From the schematic editor, Q2 is there (because the device is in the schematic) but VALUE will be empty.

See these docs for more details how the system works: Assembly Data | LibrePCB Documentation

Btw, this is also unusual:

Since the second row doesn’t have “Mount” checked, it is basically useless (discarded). The device will appear in the BOM anyway because there is another row which does have it checked. It’s valid but unusual (you could do it to enter an alternative MPN but actually don’t want it in the BOM).

@tomwbarclay Sorry, I was wrong about my assumption that the device is not in the board!

The situation is very simple: Actually, it is intended that VALUE in the BOM is empty if an MPN is given for the part. The reason is simply because if VALUE contains the MPN anyway, it would be redundant/useless information in the BOM. The MPN is more accurate and has thus priority over VALUE.

So the real question is, why is VALUE of Q1 (2N7002) non-empty in the BOM? That’s exactly because of your manually added VALUE attribute. Remove the attribute as I recommended above and set both component’s value to the default:

{{MPN or DEVICE}}

Then both Q1 and Q2 should have an empty VALUE in the BOM, because it’s not needed.