1. Help Center
  2. SOLIDWORKS
  3. Drawings/Drawing Features

How to get "As Required" in your Bill of Materials

Sometimes we have models that need an estimated number of parts or amount of fluids. A lot of users would fill this in with an “As Required” or simply A/R in the quantity column. This may become cumbersome after a certain amount of parts, because building a manual BOM is not the best way to use your time. I’ll be showing you how to make it look like you have A/R in the Quantity Column automatically.

I’ll be showing you how to make it look like you have A/R in the Quantity Column automatically.

Here, we have a simplified example. I’ve created a glass of water, with ice cubes in it. It’s easy to count the cubes and the glass, but perhaps you don’t want to estimate the amount of ounces of water, or maybe it doesn’t really matter in this case. Just fill the glass to wherever you want. A similar example would be an instruction to lubricate the chain until it is coated, while including the type of lubricant on your BOM.

To get started, we need to start at the dummy part, in this case the water, as we aren’t concerned about its size, volume, etc., just that it needs to be there. Go into the Custom Properties and add a property. Today, we’ll call it A/R, but if you prefer to make it different, you can name it whatever you’d like. Some people like to name the property "Amount" for reasons you'll see later. For its value, enter A/R. Save the part, and go back to your drawing.

Go into the Custom Properties and add a property.

Back in the drawing, we’re going to be building an equation. On this second page, I have unhidden everything to show you how we have created the table you saw earlier. The quantity column is deceiving, because it’s not the true quantity column. It is just a column named “QTY.” Below the table, we have the equations breaking these down; this is the logic we need to follow to create the new QTY. column. If you are typing this manually, keep an eye on what symbols you are using. Defining the column categories are BACK TICKS (`) not APOSTROPHES (‘). If you’re unsure, it’s the key that is combined with the Tilde (~). However, I recommend that you just use the equation builder for this.

The quantity column is deceiving, because it’s not the true quantity column. It is just a column named “QTY.”

Start your BOM and select your view. We’re going to use the default, so hit the checkmark. Place it down and start cleaning it up if necessary. I have hidden my description column, as I do not need it right now. Right click the QTY. column header and select Insert > Column Right. This column is driven by the Custom Property of A/R. Press enter to close the dialog. Repeat the column creation process and create another column on the right. This one is going to be an equation. Click on the Sigma (Σ) to open the equation builder.

Right click the QTY. column header and select Insert > Column Right. This column is driven by the Custom Property of A/R.

Start with your function of IF, stay inside the parenthesis, and then use the dropdown for Custom Properties and select A/R. Now you need to type a little bit. Press equal sign (=), quotation mark A/R quotation mark ("A/R"). These tiny symbols might make you cross-eyed but they’re very important. Press semicolon (;) to indicate the first condition of TRUE. Insert again, quotation mark A/R quotation mark ("A/R"). Press semicolon (;) again to indicate the FALSE condition and drop down “Columns” and select “QTY.” This will tell the new column to fill the information from the original QTY. column, if the As Required column doesn't read A/R.

 Press semicolon (;) again to indicate the FALSE condition and drop down “Columns” and select “QTY.” This will tell the new column to fill the information from the original QTY. column, if the As Required column doesn't read A/R.IF('A/R'="A/R";"A/R";'QTY.'). See why some people name the property "Amount" now?

And there you have it! As Required is in the QTY. column. Hide the unnecessary columns so that it’s less confusing to your end users, and you should be all set. If you are using this method a lot, you can save out the table as a template. Right Click the crosshairs at the top left, press Save as and save the template wherever you wish.

Press Save as and save the template wherever you wish.

Final note: You may notice, that you can use the custom property and skip the additional "A/R" column in the BOM. You can do this! Just make sure you are consistent throughout the part. I like to include the additional column, as it makes it a little more easy to remember.