Thanks, Chris. It worked very well :) Tunc
On 24 Apr 2013, at 23:58, Chris Kent <[email protected]> wrote: > You might need to use assignCategories > > See if the following gets you on the right track > <cfset stProps.catImage = 'list,of,catIDs') /> > ... > ... > <cfset application.fapi.setData(stProperties=stProps) /> > <cfset oCategory = > CreateObject("component","#application.packagepath#.farcry.category") /> > <cfset > oCategory.assignCategories(objectid=stProps.objectid,lCategoryIDs=stProps.catImage) > /> > > Chris. > > On Wednesday, 24 April 2013 22:54:23 UTC+1, Tunc wrote: > Thanks, Chris > > I have managed something today. I can import all including HTML. Where I > struggle is with the categories. It imports into to the content type's table > but category is not selected on the category tree when I edit the record.. > Category is Farcry's one.. > > I use this to commit to Farcy.. > <cfset stProperties = structNew() /> > <cfset stProperties.catProduct = trim(aProducts[cntArray].catProduct) /> > ... > > <cfset stResult = ohpcProduct.createData(stproperties=stProperties) /> > > > On 24 Apr 2013, at 20:08, Chris Kent <[email protected]> wrote: > > > I have always coded my own import scripts, usually find the hardest part is > > getting the content in the correct format - inserting content into FarCry > > is very easy using setData > > > > <cfset stProps = structNew() /> > > <cfset stProps.objectID =application.fapi.getUUID() /> > > <cfset stProps.typename = "yourTypeName" /> > > <cfset stProps.title = import.title /> > > <cfset stProps.prop1 = import.prop1 /> > > ... > > ... > > <cfset stProps.prop99 = import.prop99 /> > > <cfset application.fapi.setData(stProperties=stProps) /> > > > > > > > > Chris. > > > > On Wednesday, 24 April 2013 17:26:13 UTC+1, Tunc wrote: > > Hi > > > > Is there an example script of importing data from CSV or Excel files? I do > > recall a plug in called Import few years ago but it looks like it is no > > longer available. When I tried it last time for Farcy 6 it did not work > > though. > > > > Thanks > > Tunc > > > > -- > > You received this message cos you are subscribed to "farcry-dev" Google > > group. > > To post, email: [email protected] > > To unsubscribe, email: [email protected] > > For more options: http://groups.google.com/group/farcry-dev > > -------------------------------- > > Follow us on Twitter: http://twitter.com/farcry > > --- > > You received this message because you are subscribed to the Google Groups > > "farcry-dev" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > -- > You received this message cos you are subscribed to "farcry-dev" Google group. > To post, email: [email protected] > To unsubscribe, email: [email protected] > For more options: http://groups.google.com/group/farcry-dev > -------------------------------- > Follow us on Twitter: http://twitter.com/farcry > --- > You received this message because you are subscribed to the Google Groups > "farcry-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry --- You received this message because you are subscribed to the Google Groups "farcry-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
