Calculating Fields II
With the mouse, we will click and drag the ones we need to the bottom portion: the grid columns.
As you do this, you will notice that the "Table" and "Show" rows are also filled automatically after we placed our selections in the first row.
But, we are still missing the calculating field. As we mentioned previously, we want to know the total value of the products in stock. We deduced that the amount would be the result from multiplying the "In Stock" fields times the "Unit Price" fields for each product. We will do this step by step:
First, we need to choose an empty space and add a Title to it. How about "Total"?
Now, we need to write our mathematical operation in the following manner:
Total: [ ]*[ ] , it is important for us to respect the blank space after the colon ":". Inside the brackets , we will write the names of the field we want to use to calculate.
It should look like this: Total: [Unit Price]*[In Stock]
Finally, we need to select the slot "show" to be able to view the result of our operation after we Run our Query.
We click on the "Run" icon, and this is the result. REMEMBER: I added dome values to the table before doing this. The values I added to the "Products" Table were the ones you see below.