RitchieTheBrit Posted March 14, 2019 Share Posted March 14, 2019 Hey guys, Trying to put together a worksheet that selects symbols based on their layer and record fields. A quick overview is we have three 'types' (beam, pole and door) and two 'finishes' (black and silver). To make life bearable for my colleagues, I want them to be able to open the criteria manager and simply change the layer they are referencing. Unfortunately, when drilling down the criteria, if I choose to select 'black' and 'beam', it inserts a pipe instead of an ampersand, causing it to select all items that match 'black' OR 'beam'. I can fix this manually, but whenever the criteria manager is used to change the layer it reverts to using a pipe. Incorrect selection criteria =DATABASE(((L='MASTER') & (R IN ['Stock']) & (('Stock'.'Finish'='black') | ('Stock'.'Type'='beam')))) Correct selection creiteria (manually edited) =DATABASE(((L='MASTER') & (R IN ['Stock']) & (('Stock'.'Finish'='black') & ('Stock'.'Type'='beam')))) Quote Link to comment
Pat Stanford Posted March 14, 2019 Share Posted March 14, 2019 Unfortunately that is the way the criteria builder works (for now). Criteria of different types (Layer, class, record.field, etc.) are ANDed together. Criteria of the same type (multiple record.field criteria in your case are ORed together. You can either teach your coworkers to manually edit the formula or potentially get a script that can modify the criteria to be what you want. Let us know if you want to explore the script option. 1 Quote Link to comment
RitchieTheBrit Posted March 14, 2019 Author Share Posted March 14, 2019 12 minutes ago, Pat Stanford said: Criteria of different types (Layer, class, record.field, etc.) are ANDed together. Criteria of the same type (multiple record.field criteria in your case are ORed together. Aha! Seems a little odd. It would make more sense for me to have a drop down on each criteria giving the option of AND/OR. Anyhoo, your explanation worked for me, I simply used the symbol name for the TYPE as I included there as well. Many thanks! 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.