Just to add to this. You can use the cfa_typeIndexCreate tag which basically does what Seth has described here. It goes through any type you pass it and checks for it's indexed properties and creates a collection for each property. If the collection already exists then nothing happens. If all the collections already exist for a type this tag is relatively fast. It's also a short tag so you can open it up and see if it does what you are looking for.
Andrew Hewitt Webworld Studios, Inc. www.wwstudios.com -----Original Message----- From: Seth Hodgson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 11, 2001 7:58 PM To: Spectra-Talk Subject: Re: cfa_IsCollection Hi Guy, If you are wanting to create/update verity collections that correspond to properties of content object types - try using <cfa_objectTypeGetPropertyDefinitions ... r_stTypePropertyDefinitions="stTypePropDefs"> You have the typeID, so run this tag and loop over the returned r_stTypePropertyDefinitions. You could either run cfa_isCollection calls using the collection names for each or only the desired properties - by concatenating the following attributes to get the collection name while looping over the returned struct: stTypePropDefs[currElem].PROPERTYDEFINITIONID & stTypePropDefs[currElem].PROPERTYNAME There is also a bIndexed field for each type property that will be 1 if it is an indexed property with a collection and 0 if not. You could base your collection creation on this bit field being 0. That would save the cfa_collection call. If it is 1 you can go ahead and repair/optimize the collection. Cheers, Seth ----- Original Message ----- From: "Guy McDowell" <[EMAIL PROTECTED]> To: "Spectra-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, December 11, 2001 10:41 AM Subject: cfa_IsCollection > I would like to use the cfa_IsCollection tag to see if a collection exists > for any number of properties. > > However, I see that the collection's name is a concatenation of > propertydefinitionid from the table propertydefinitions and the propertyname > from the table properties. > > So, I presume that I have to do an SQL to find those two values and > concatenate them together and then pass that into the cfa_IsCollection tag > to see if it exists. > > If so I have to write an SQL statement that also draw information from the > objects table and types table as there is no directly corresponding fields > between propertydefinitions and properties tables. > > Am I on the right track here or is there an easier way? Please tell me there > is an easier way. Please..... :-) > > > The purpose of this is to test to see if the collection already exists. If > it does; simply update it. If it doesn't; create it. > > > Truly, > Guy > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm ------------------------------------------------------------------------------ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
