Jump to content

OR filter for database subrows (not XOR)


Recommended Posts

hello,

I would like to list PIOs that meet either criteria A OR criteria B
but as I understand it there's only the option for XOR meaning either A or B but not A and B?

 

or am I missing something?

 

thanks,

george

 

 

grafik.png.14fc642d2a287dce7fadd8d1578f3b0b.png

 

 

  • Like 1
Link to comment

Thanks @Pat Stanford for looking into this.
Tried your rectangles and circles example and it worked fine.
But I can't get it to work with "Ebene" (Layer) and "DB-Feldeintrag" (Database Field Entry with [DB-Feldeintrag // Dst_Dev_Tag // = // *1234*]), while both individually work just fine. 🤷‍♂️
(want to have a list of all Cable from and to a location in ConnectCAD)

Link to comment

Today that filter option was missing yet again... and resulted in a lot of manual updating. 🥲

Sorry, @Nikolay Zhelyazkov for involving you here, but do you by any chance know how to show all cables FROM and TO a room in a single list?

(Or should I open a new ConnectCAD thread for this? Although I think this is not a ConnectCAD issue, just a CCAD use-case?)

 

 

Thanks!

Link to comment
  • Vectorworks, Inc Employee

Hello @elc,

 

If I got you right, the attached file should have a worksheet that gets the job done. In order to achieve this you have to manually write the criteria and use OR | in it instead of AND & and take care of operator priority by adding some extra brackets, so you need some coding knowledge to get this done.

 

Let me know if this is what you were trying to achieve.

 

Best Regards,

Nikolay Zhelyazkov

RoomCircuitsWS.vwx

  • Like 1
Link to comment

It appears that the Any Criteria subsets only work with similar criteria.  So in @Nikolay Zhelyazkov example above, since both of the ANY criteria are both field values it works.

 

If you tried to do a Field value and and Layer, it will not work.

 

In my Not So Humble Opinion, if you are going to have an ANY criteria, then it should actually be ANY and mixes of different types of criteria should work.  Especially if you are limiting the objects by another criteria.

  • Like 1
Link to comment
  • Vectorworks, Inc Employee

There is an existing bug where the OR condition doesn't work with the LAYER criterion. It works will all other criteria.
This is going to be fixed.

  • Like 3
Link to comment
15 hours ago, Nikolay Zhelyazkov said:

If I got you right, the attached file should have a worksheet that gets the job done.

thanks @Nikolay Zhelyazkov for taking the time. looked at your file and you are right, I could use the source and destination room criteria. but that would require me to add equipment and room objects to all my devices which is something that I plan to do but don't have the time for right now. 😕

 

Guess I might have to wait for that fix.

Link to comment
  • Vectorworks, Inc Employee
1 hour ago, elc said:

thanks @Nikolay Zhelyazkov for taking the time. looked at your file and you are right, I could use the source and destination room criteria. but that would require me to add equipment and room objects to all my devices which is something that I plan to do but don't have the time for right now. 😕

 

Guess I might have to wait for that fix.

- Well you mentioned you want to get circuits based on rooms and that is why I used rooms. What is it exactly that you use to distinguish the circuits?

Link to comment
On 3/25/2022 at 2:44 PM, elc said:

But I can't get it to work with "Ebene" (Layer) and "DB-Feldeintrag" (Database Field Entry with [DB-Feldeintrag // Dst_Dev_Tag // = // *1234*]), while both individually work just fine.

The schematic for each room is on a different design layer.

So, for the FROM side of a circuit I am using the layer and ... never mind.

Not trying to make up any excuses: While writing this, I realized that I am an idiot. 😄

 

As @Pat Stanford found out, the OR function works with similar criteria, so all I have to do is use the "DB-Feldeintrag" (engl. data base field entry) twice as a criteria with the room number as *1234* in Src_Dev_Name and Dst_Dev_Name.

=DATENBANK(INVIEWPORT & INSYMBOL & ((PON='Circuit') & (('Circuit'.'Src_Dev_Name'='*1234*') | ('Circuit'.'Dst_Dev_Name'='*1234*'))))

Works like a charm.

 

 

However, I am still looking forward to that bug/function fix, as you never know, what magic you might want to work in the future with a "real" OR filter. 😉

 

 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...