MattG Posted February 23, 2021 Share Posted February 23, 2021 I have been okay doing this in the past but am noticing an issue now in 2021 but unfortunately have not been doing as much lighting in VW these days with the pandemic. It appears I am having trouble dropping the "lbs" from the fixture weight in a worksheet that pulls the data from the lighting device criteria. I used to be able to do =Value() and it would bring back the number, and my secret if I wanted it there was that I could then just put the lbs in the cell formatting as a suffix, but everything I have tried seems to be unable to dump the lbs suffix off that. Any help is appreciated. I feel like @Pat Stanford has probably already solved this...... 🤣🤣 Thanks, Matt Quote Link to comment
michaelk Posted February 23, 2021 Share Posted February 23, 2021 He probably has 🙂 It's weird that you can't edit the weight field to drop the pounds. I know I used to do it all the time before 2021. Back when we still did shows. But you can use a simple script to strip it out. See attached. DropThePounds.vwx Quote Link to comment
Pat Stanford Posted February 23, 2021 Share Posted February 23, 2021 =Value(Substring(XXXX,YYYY,1) is your friend. XXXX is the string value that includes the Lbs. YYY is what separates the number from the Lbs. In this case a space (' ' Single quote, space character, single quote) 1 is that you want the first piece of the substring. Also, check and see if there is not a different field that returns the value as a number instead of giving your the string formatted with the units. On deadline now. I will double check this later if I don't see you post that it worked. This is from memory, so it may be wrong. Do a search for post from me that include Substring and you should find what you need. 1 Quote Link to comment
michaelk Posted February 23, 2021 Share Posted February 23, 2021 @Pat Stanford Yep. =VALUE(SUBSTRING(('Lighting Device'.'Weight'), ' ', 1)) Even easier 🙂 Quote Link to comment
MattG Posted February 23, 2021 Author Share Posted February 23, 2021 Man this program drives me nuts sometimes. Thanks! I did a dummy report with every field hoping to find the secret field that may store the units but no luck. Just really odd. I do that using some of the braceworks stuff to make custom things manipulating that data, but it seems really odd that is a hard value. Either way for now that works. Thanks as always. Matt Quote Link to comment
Pat Stanford Posted February 24, 2021 Share Posted February 24, 2021 Submit a wish to have an alternate field added that is the numeric version of whatever the Styled Text output is. I think I did that for Doors and Windows a few years ago. I think I requested if for all PIOs, but obviously that has not happened yet. Quote Link to comment
JBenghiat Posted February 24, 2021 Share Posted February 24, 2021 2 hours ago, Pat Stanford said: Submit a wish to have an alternate field added that is the numeric version of whatever the Styled Text output is. I think I did that for Doors and Windows a few years ago. I think I requested if for all PIOs, but obviously that has not happened yet. For lighting devices, you can get the field Weightdouble. It returns the weight in grams regardless of units, so you have to hard-code in the unit conversion in the formula. 2 Quote Link to comment
MattG Posted February 25, 2021 Author Share Posted February 25, 2021 @JBenghiat thanks that is very helpful info and I would have never found that. I wish there was somewhere that documented those fields, I can see real use for it. Thanks, Matt 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.