techdef Posted September 29, 2023 Share Posted September 29, 2023 I can't find one,=COUNT(PON='Parking Spaces') can count the number of Objects of type parking Space, but since some of them hold multiple stalls this is pointless. How to count total number of stalls? Quote Link to comment
Pat Stanford Posted September 29, 2023 Share Posted September 29, 2023 Different Function for each of the three different parking objects. You can add all of these into a single cell by using a + sign between them if you want. =OBJECTDATA(PON='Parking Spaces', 'Universal Value', 'Parking Spaces', 'No of Spaces') =OBJECTDATA(PON='Parking Along Path', 'Universal Value', 'Parking Along Path', 'Num Spaces') =OBJECTDATA(PON='Parking Area', 'Universal Value', 'Parking Area', 'Num Spaces') Note the difference in the field names between the different lines. I figured out the Record and Field names using a script I started about 15 years ago. You might want to at least glance through the entire thread, but I think this link is to the latest version. Ask if you need more help. 2 Quote Link to comment
techdef Posted October 2, 2023 Author Share Posted October 2, 2023 @Pat Stanford, you're the best. I'm going to add a by class designation too, so we can do cars, bikes separately. 1 Quote Link to comment
techdef Posted October 2, 2023 Author Share Posted October 2, 2023 OK, yeah I'm failing. Some subtle difference between Count and ObjectData giving me #OPCODE? error. How to combine a class filter with the Objectdata? (C='Site-Parking-Cars') Quote Link to comment
Pat Stanford Posted October 2, 2023 Share Posted October 2, 2023 Something like the following should work: =OBJECTDATA((PON='Parking Spaces' & C='Site-Parking-Cars'), 'Universal Value', 'Parking Spaces', 'No of Spaces') Everything before the first comma in the ObjectData function is the criteria to be employed by the rest of the function. Quote Link to comment
techdef Posted October 2, 2023 Author Share Posted October 2, 2023 Hmmm, thanks again, but still no dice. Its strangely not even giving an error, just showing the text as though it weren't a function at all. Using Count and the PON & C= works to get the number of objects narrowed down, but the & seems to fail the objectdata function? Quote Link to comment
Pat Stanford Posted October 2, 2023 Share Posted October 2, 2023 It appears that ObjectData in a spreadsheet cell is not working properly with "Compound Criteria" It is working in a Database with compound criteria. If you can get a database to work for you then you could use the following criteria (or build it using the criteria builder) and get what you need. ((C='Site-Parking-Cars') & (PON='Parking Spaces')) The extra parentheses must be included as part of the criteria. After I play with this a little more I will file a bug report on the use of compound criteria with ObjectData functions. 1 Quote Link to comment
techdef Posted October 3, 2023 Author Share Posted October 3, 2023 Thanks again Pat, Database does work, and I'll just pull from there. PS: I sent you a PM. 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.