[SmartBom] Fill in an empty field in a BOM

Hello

Yet another question (and I hope I have more for today ^^).

This time it is some 3D solidworks parts whose material has not been filled in. The problem is that in the nomenclature it shows me the following field "Material <not specified>", I would like it to show me an empty box instead.

While searching in the SmartBom help, I came across this:

The "IIF" syntax can be used in uppercase or lowercase "iff". The character "|" is obtained by combining the "AltGr" and "6" keys. To retrieve a property, place the "$" character in front of the property name (case sensitive).

Example : IFF($Mati era=Steel|Polishing|Painting)

If the "Material" property is equal to "Steel" then the column cell will be equal to "Polishing" otherwise the column cell will be equal to "Paint".

So I think I need a formula like this: If the "Material" property is equal to "Material" then the column cell will be equal to "Material" (the value of the material entered in solidworks in fact) otherwise the column cell will be equal to "".

Do you think there is a formula for what I want?

Thank you in advance and have a good week.

Hello, you have to try:

IFF($Mati era=||$Mati era)

or

IFF($Mati era=Material <not specified>||$Mati era)

or (with a space):

IFF($Mati era= ||$Mati era)

or (as proposed):

IFF($Mati era=Material||$Mati era)

I don't see any difference between your two formulas. Maybe it's me who has a vision problem? ^^

But no, it doesn't work like that. I even changed Matter to Material because that's what my property is called.

EDIT: I've seen your different formulas, but none of them work. 

So maybe we need to put a space between the two | to mean that it is an empty field:

Hello, you have to try:

IFF($Mati era=| |$Mati era)

or 

IFF($Mati era=Material <unspecified>| |$Mati era)

or (with a space):

IFF($Mati era= | |$Mati era)

or (as proposed):

IFF($Mati era=Material| |$Mati era)

No, still not. :/

And with the "predefined choice list" box, can't we get anything out of it?

Maybe I need to make a VBA formula in my excel to tell it that "Material <unspecified>" = ""?

1 Like
In the Excel file indeed I am sure I can!

As I don't know in which column the matter is, just replace the number 5 after the equal sign of the 2nd line (Colonne_Matiere = 1 for A, 2 for B etc...)

Here is the macro for the Excel file:

Sub matter()
Colonne_Matiere = 5' column E = 5
der_ligne = Range("a9999"). End(xlUp). Row
A = 0
For i = 1 TB der_ligne
    If Cells(i, Colonne_Matiere) = "Material <not specified>" Then
        Cells(i, Colonne_Matiere) = ""
        A = A + 1
    End If
Next i
MsgBox "Processing completed: & A & " replacement(s) made."
End Sub