Bruce Kieffer Posted December 15, 2023 Share Posted December 15, 2023 Is it possible to use an if/then formula in a data tag definition? I'm tagging a Material I named PB, and I want to tag that as Particle Board. Alternatively I could change the Material to Particle Board and use an if/then formula in my worksheets that count the Particle Board Material, and make them display PB. Quote Link to comment
Tom W. Posted December 15, 2023 Share Posted December 15, 2023 If I understand you correctly a more straightforward option might be to just enter 'Particle Board' in (for example) the 'Description' field for the Material: then, depending on the formula you used, you could return either 'PB' or 'Particle Board' in your tags/worksheets depending on what you wanted to see at any one time. Quote Link to comment
Pat Stanford Posted December 15, 2023 Share Posted December 15, 2023 The best way to do IF/Then in a Data Tag is by using the Worksheet IF command. I think you are already familiar with this from using it in worksheets. In a DataTag formula you enter it as: #WS_IF(condition, true value, false value)# Inside the function (between the #WS_ and the end #) you have to use pure worksheet functions. You can't use Data Tag nomenclature inside the #WS_ # block. Ask again if you need more help. Or even better, post a file with your data tag format and a couple of your PB objects so we can make sure we are offering the correct solution. Quote Link to comment
Bruce Kieffer Posted December 15, 2023 Author Share Posted December 15, 2023 You both understand what I want. @Pat StanfordI'm pretty sure I can make the #WS_IF(condition, true value, false value)# formula work. I also like Tom's suggestion if I can make that work. @Tom W. Can you explain how I make the Material Description field appear as the tag data? Quote Link to comment
Tom W. Posted December 15, 2023 Share Posted December 15, 2023 49 minutes ago, Bruce Kieffer said: Can you explain how I make the Material Description field appear as the tag data? For example: The Material settings: The Data Tag settings: The Data Tag in action: There is tons of useful data you can attach to Materials. Here is the full list of values you can return using the formula above (from Worksheet Functions) : 1 Quote Link to comment
Bruce Kieffer Posted December 15, 2023 Author Share Posted December 15, 2023 @Tom W. That's cool. I have it working. 2 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.