10-12-2016 05:21 AM
Hi,
I want to add a custom values (metadata fields) to standard type in Alfresco. I tried to add custom types in model, with all metadata that I need, but still after adding file, I have to manually change type so Alfresco will show me my custom fileds of metadata. This is how it looks now:
I have some metadata in Models/Custom Types:
So if I add a file (to sites/document library), I have to change type, so alfresco shows me my custom metadata:
Then metadata could be filled:
But I want my custom metadata fields to be added for all files, which I put to Alfresco like that:
But without changing file types in first place. For example that all added files will have automatically set type to my custom one or to add my metadata to default file type. How can I do that?
10-14-2016 04:16 AM
1. you might need to create 2 rules on 'User Homes' and your 'Sites' and check the 'apply to subfolders'
2. you need to make your type visible in share: Share configuration for custom types and properties | Alfresco Documentation
3. you can do that, but as Douglas C. R. Paes already pointed out, thats probably not what you want. it can lead to problems.
1 thing to know about specializing an item is => you can not 'unspecialize' it once its in the repo. and your users can potentially upload anything.
do you want 1000 jpeg's of somebodies cat with your special type? i don't think so.
create a strict rule that only applies your type to the files that really need it.
10-12-2016 06:56 AM
To do that, you need a folder-rule with "Specialise the type of an item" action
10-12-2016 09:09 AM
I think it's not I wanted to do, because I wanted all files that came into repository get specific type type, not only ones in specific folder. I don't want to set all new folders created by users with rules. I'm thinking about more "global" approach, maybe editing some xml file in alfresco server, but i don't know which file, and what to edit
10-12-2016 07:25 PM
Tomasz, you folder rule can be applied in a lower level, like, for the documentLibrary folder for a site.
But you have to make sure you don't deal with ALL objects being created, because there are OOTB objects created by alfresco that can not be specialized for custom types.
So, the ideal approach is to use a filter, like, for all documents created, AND with mime type of doc, docx, pdf, txt, whatever, then specialize it.
10-14-2016 03:13 AM
Ok, I tried to do that, but I have 3 questions:
1. How can I use that rule to all folders in all users and sites?
2. When I try to use that rule, I can't find my set of metadata (called Metadane), there is only Inteligent Folder Template, and Place to transfer files
Is it something I do wrong?
3. Maybe there is an option to add my custom metadata to all base metadata included in default type? (there are some metadata present in all types like e.g. Name, can I add some of my custom metadata there?)
10-14-2016 04:16 AM
1. you might need to create 2 rules on 'User Homes' and your 'Sites' and check the 'apply to subfolders'
2. you need to make your type visible in share: Share configuration for custom types and properties | Alfresco Documentation
3. you can do that, but as Douglas C. R. Paes already pointed out, thats probably not what you want. it can lead to problems.
1 thing to know about specializing an item is => you can not 'unspecialize' it once its in the repo. and your users can potentially upload anything.
do you want 1000 jpeg's of somebodies cat with your special type? i don't think so.
create a strict rule that only applies your type to the files that really need it.
10-14-2016 08:58 AM
I tried to do that, and I get the error "unable to change file type" when I want to change it in single file, and it didn't appeard in rules for directories. But leave it for now.
I have another idea. All I want to do is just add some of my metadata fields in common metadata (by common metadata I mean Name, Title, Description, Author - I just want to add there some other fields), so all files independently of type, will get few extra metadata fields. Can I do that? File types will be the same, just want to add some custom fileds in file properties.
Thank you all for all your previous replies.
10-14-2016 09:28 AM
is there an error message in your log file when you tried to specialize?
you can edit the default model but it is not recommended to do that. and that change will not work retroactively.
10-14-2016 09:54 AM
I will send my log in monday, but I want to ask, how to edit alfresco's default model?
10-14-2016 10:02 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.