spries Posted April 9, 2020 Share Posted April 9, 2020 Hi, My symbols have a record data attached. Specifically the weight. How can I get the weight information into one column? And further more, how can the Weight data out of a record be multiplied by the count? After all that, how can I add the TOTAL WEIGHT to one final number? VWX Reports.vwx Quote Link to comment
michaelk Posted April 9, 2020 Share Posted April 9, 2020 Yes. There are a couple ways. You could use an IF/THEN/ELSE statement to return the value from different record formats. OR you could just use one record format. That might be a lot easier 🙂 Sum Values to get the total weight. Call the header cell for total weight. VWX Reports~.vwx Quote Link to comment
spries Posted April 9, 2020 Author Share Posted April 9, 2020 @michaelk Creating a record with hundreds of symbol weights seems a lot of typing. I also don't know if that would help, as soon a symbol name changes. Regarding your IF/THEN suggestion, where in the report would I add this formula, since I can't even reference a cell like G2.3 for instance. Quote Link to comment
michaelk Posted April 9, 2020 Share Posted April 9, 2020 No need to create a record with hundreds of weights. Just create a record with one field. Make the default value of each symbol be the weight for that symbol. No need to type it in ever again. Let me see if I can make an example this afternoon. Quote Link to comment
Pat Stanford Posted April 9, 2020 Share Posted April 9, 2020 Also, you need to make sure that your Weight field contains a number (32.2) and not a text value (32.2 #) (the number plus a unit mark). Only numbers can be used to do math without extra work to extract the number part. @michaelk can help you out if you do have the data stored as text 😉 Quote Link to comment
spries Posted April 9, 2020 Author Share Posted April 9, 2020 @Pat Stanford I made sure all the weights in the record are set as numbers. Quote Link to comment
Peter Vandewalle Posted April 9, 2020 Share Posted April 9, 2020 If it is text just use =value() Quote Link to comment
Pat Stanford Posted April 9, 2020 Share Posted April 9, 2020 =Value() only works if the text only contains something that will convert to a number. So '35.5' will work '35.5 kg' will not. If you have unit marks mixed in you will have to do further text processing to remove them before taking the value. Quote Link to comment
michaelk Posted April 9, 2020 Share Posted April 9, 2020 The way you're doing it is making a record format for each symbol and using the default values of the record format as the symbol value. I think you can make ONE record format and assign values in the symbol definition. That way the weight of every symbol is called from with the same record.field call. To do that I made one record format with all the fields from both. There was only one field that was unique to the shackles. (Crosby part number). Then, in the Resource Manager, Edit a symbol. Choose 2D component (doesn't matter that there is no 2D component). Make sure nothing is selected - OIP should say No Selection. Click on the Data Tab of the OIP. Click on Attach Record. Select the record format. Enter the default values for that symbol in the fields below. From now on, whenever you insert that symbol those values will be attached regardless of what the record format defaults are. I added a factor field anticipating that you would have more than just 1ft and 2ft schedule 40 pipes. Just make the Factor be the length in feet and you can call the weight as 'record name'.'Weight (LBS)' * 'record name'.'Factor'. That will give you the weight of 1 foot of schedule 40 times the length of the pipe. For shackles, just leave the Factor as 1 and it doesn't matter. No need to multiply by the count. There is a little triangle pulldown in each cell of the header row. Click the one for the weight column and choose select Sum Values. That will keep a running total instead of reporting the weight of just a single instance. To get the total total weight, go to a cell outside the database (the row header will not have a decimal). Type the equal sign and then click in the row header cell for the column who's total you want. This will report that total, even when the database header row is not visible. Hope that helps. Post back if you still have questions or if you really really want to know how to do the nested IF/THEN/ELSE statements. VWX Reports~~.vwx 1 Quote Link to comment
Boh Posted April 10, 2020 Share Posted April 10, 2020 Note that you can alternatively attach records and set default values for symbols by right clicking on a symbol in the rm and clicking “attach record”. Quote Link to comment
michaelk Posted April 10, 2020 Share Posted April 10, 2020 20 minutes ago, Boh said: Note that you can alternatively attach records and set default values for symbols by right clicking on a symbol in the rm and clicking “attach record”. Good point. I'm just an old-fashioned guy :-). Comes from years of making my own lighting symbols back in the day. Just because. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.