Video: https://youtu.be/jP-VzYwzCck
Instructions from Video:
When you organize materials in a project estimate you may need more options for organizing the materials than what the “Phase” and “Usage” of the products offer. In this tooltip we will discuss “Alt Code” an additional code that offers more sorting options to a report.
Select Tools>Analyze>Generate Project Estimate.
In the Generate Project Estimate dialog box, it lists all the materials used in a project according to the report template style that you select. The Standard report form template organizes the materials by location. You can see the headers for each section are the location names and it gives a straight list of what is used on that location. At the top of the dialog select the dropdown list of report styles and change the report form template to Quote Generator. The materials reorganize.
Each heading now becomes a little more complex. Now the group headings are Ground Floor Floor System and Ground Floor Wall Framing. It has grouped items by a number followed by their location and by their usage. It was able to do that because this report template is sorted by the Alternate Code. The alternate code allows you to combine a series of values together for sorting purposes. Let us look at the Alternate code and how it can sort elements in our project into more refined groups. Click Exit to close the material report.
Select Insert>Walls>Walls. In the catalog panel to the right select one of the walls, right-click and select Edit Element.
In the Walls dialog box, select the Quantity tab. Here we can see the variables “Phase” and “Usage” that the Standard report form used to organize the items. Click on the Phase listed and a button appears. Click it to select a new phase. Phases are just names of boxes that we want to throw materials into to keep them organized and arrange to have delivered on-site. Each one of these phases also has a number associated with it, and we can use the number to also help us organize the boxes of materials. Click Cancel to exit the dialog box.
Another variable that is associated with every element is “AltCode”. Select the AltCode and a button appears that gives access to alter it. Select the button.
The Define formula dialog box appears. An Alternate code is a formula, an equation, of how you want materials to report. Breaking the default alternate code into sections will help to illustrate what it is saying and how that affects how elements are organized in the material list.
if(or(Phase=”Floor System”,Phase=”Wall Framing”,Phase=”Ceiling Construction”),tostring(Location Number)+Phase ID+” “+Location+” “+Phase,Phase ID+” “+Phase)
The first section of the formula says;
If the phase of a material is set to “Floor System” or “Wall Framing” or “Ceiling Construction”, those materials we want to organize by their location number, their Phase ID number, their location and then finally by their phase name.
So looking at the material list we can see that “200 Ground Floor Floor System” is a group heading. It followed the rules of the alternate code. The phase for these materials was set to Floor System so it first listed the location number: 2, then phase number 00, and then the Location name of “Ground Floor” and then the phase: Floor System. The next group heading followed the alt code rules also. The items in this section had a phase set of “Wall Framing” so they get organized by their location number: 2, their phase ID number: 10, their location name Ground Floor and their phase “Wall Framing”.
Looking at the first group heading 010 Foundation Construction, it does not follow those rules because the elements in this group don’t have the phase Floor System, Wall Framing or Ceiling Construction. So, they follow the last part of the alt code rule, any material that does not have those phases, just list the Phase ID and the Phase.
So when you create an IF statement you list what the rule is for the “If”, in our case, if materials have the phase “Floor System”, “Wall Framing” or “Ceiling Construction” and you put that rule in brackets.
if(or(Phase=”Floor System”,Phase=”Wall Framing”,Phase=”Ceiling Construction”),
After the bracket you place a comma that marks the start of instructions for what happens to those items that are part of the If statement, we group them according to their locations number phase id location and phase.
tostring(Location Number)+Phase ID+” “+Location+” “+Phase
After that, we put a comma and start instructions for those elements that aren’t in the IF rules, in our example, we just organize them by phaseid and phase.
Phase ID+” “+Phase)
If you need to alter how elements are organized in a material list to follow your shipping rules, change the alternate code for elements in your catalog. I hope that makes your work easier.