Hiding the Primary File field in UCM

A month ago I wrote a post about performing a check-in to UCM without a file. Let's take it one step further and hide the Primary File field altogether so that the contributor doesn't have to make a choice.

First, instead of applying the AllowPrimaryMetaFile=true configuration entry to the entire instance like I wrote in the other post, we'll apply it only to specific Profiles. Then for that same Profile, we'll default the choice to check-in a metadata only file and hide the form fields themselves.


  1. Establish your Rules for your Profile in Configuration Manager applet.

  2. On the General tab of the Rule, check the 'Use rule activation condition' box and click Edit...

  3. Go to the Site Effects tab and add each of these Keys and Values:


    AllowPrimaryMetaFile=true

    createPrimaryMetaFile=1

    primaryFile:rowStyle=display:none



HidePrimaryFile.png

Now when you display your check-in page, the fields for Primary File and Alternate file will be gone and the form will accept just metadata entries.

PrimaryFileFieldHidden.png

Comments:

Kyle, very nice. Somewhat different from how I've done this in the past, but I like this better. Thanks!

Posted by Jason Stortz on November 10, 2010 at 05:16 AM CST #

Kyle, I tried this on UCM 11g and I noticed that the "Alternate File" field was still available, I tweaked the code a bit and added this Key and Value combination: alternateFile:rowStyle=display:none After adding this, both the "Primary Field" as well as the "Alternate Fields" where gone. Thanks, Lahya

Posted by Lahya on June 07, 2011 at 10:04 PM CDT #

kyle,

in the same i want to hide custom metadata in custom profiles based on criteria.

ex: if i select particular security group,custom metadata dropdown list should be hidden,for remaining security groups it should be visible.

how to achieve this ??

Posted by guest on June 15, 2011 at 11:37 PM CDT #

There isn't a way out of the box to dynamically show/hide fields based upon the choice of another field. You would need to customize the includes that display those fields in order to achieve that. Otherwise, you'll need to create multiple profiles that satisfy what should be shown or hidden based on pre-defined choices. Thanks, -Kyle

Posted by Kyle Hatlestad on June 16, 2011 at 01:31 AM CDT #

Hi Kyle,
Thanks a lot for this article as I was looking for a solution in which I need to enable primary file upload for a few content types and for a few not.

So thanks a lot again.

I would like to ask you one quick question related to this. If i am performing the checking in of the documents through a java class file, how do I specify the profile name and trigger value in that so that it will pick up the correct profile - if its possible to do so?

My checkin code will be something similar to

File f=new File("D:/testfolder/Oracle IPM - Admin.doc");

String filePath = eventData.getTemporaryDirectory().replace("\\", "/");
System.out.println(" doc title :"+metadata[2]);
eventData.putLocal("IdcService", "CHECKIN_UNIVERSAL");
eventData.putLocal("dDocTitle", metadata[2]);
eventData.putLocal("dDocAuthor", "weblogic");
eventData.putLocal("dDocType", "Document");
eventData.putLocal("dSecurityGroup", "public");
eventData.putLocal("xCollectionID", "425180507509000004");
// eventData.putLocal("primaryFile:path", filePath);
eventData.putLocal("primaryFile", filePath);
eventData.putLocal("doFileCopy", "1");

Posted by Poornima on June 19, 2011 at 06:25 PM CDT #

Hello Poornima,

The way to specify the profile trigger field and value is the same way as any other custom metadata field. For example, the default profile trigger field in UCM 11g is 'IdcProfile'. So setting that would look like:

eventData.putLocal("xIdcProfile", "System");

So set "xIdcProfile" to whatever profile trigger field name is defined in your instance and "System" to the trigger value.

Thanks,
-Kyle

Posted by guest on June 20, 2011 at 01:14 AM CDT #

Is there a way to move the required fields into one grouping? I looked through the Rules for the Primary file but could not locate it. Is there a config variable you know of to keep these grouped? Basically moving the primary field to the first 3 rows.

Thank you!

Posted by guest on June 22, 2011 at 09:35 AM CDT #

I actually got it...thanks anyway!

Posted by guest on June 23, 2011 at 07:13 AM CDT #

Hello Kyle,
Thanks a lot for your articles, they're quite accurate and useful.
By the way, is it possible to "hide" standard check-in form/search so the user has to choose a concrete content profile?

Thanks again!

Posted by Esteban on June 26, 2011 at 10:04 PM CDT #

Hello Esteban,

Unfortunately, it's not possible to hide those menu choices through configuration. But here is a sample custom component that can hide them: https://www.samplecode.oracle.com/tracker/tracking/id/CS629/linkid/prpl1003

Thanks,
-Kyle

Posted by Kyle Hatlestad on July 07, 2011 at 04:21 AM CDT #

This is a great post. I am using this to conditionally hide the primary/alternate file fields if a piece of content was originally checked-in as metadata only.

Posted by Jonathan Hult on January 26, 2012 at 09:18 AM CST #

Is it possible to hide the user defined(custom) metadata field?
As you done for Primary file.

Posted by guest on June 12, 2012 at 07:32 AM CDT #

Yes, you simply use a Rule to select your field and change its Type to 'Hidden'. http://docs.oracle.com/cd/E23943_01/doc.1111/e10978/c04_metadata.htm#DAFIBDHH

Thanks,
-Kyle

Posted by Kyle Hatlestad on June 12, 2012 at 07:59 AM CDT #

Hello Kyle,

Can you please tell me how to get the path of primary file after checking-in?

Thanks in Advance!!

Posted by guest on June 18, 2012 at 09:19 AM CDT #

Hi Kyle,

Can we have a option to change the label "Metadata Only" to custom one like "Browse file".

Regards,
lpathi

Posted by guest on September 10, 2012 at 09:03 AM CDT #

Hi Kyle, and thanks for all your useful answers....

I want to ask you 2 new questions, if you have any advice it would be very appreciable:

1. How can i hide the "WebCenter Content" title on the upper left corner of each page? I know that the logo gif is the oracle_logo.gif, but i want to replace it with a bigger gif that will take place both of oracle_logo and "WebCenter Content" title. Is this possible?

2. I want to change the results template of the folders_g component (e.g. add the title column), but i'm totally lost on ucm 11g.....

Thanks in advance !!!!!!

Sakis

Posted by Sakis on November 26, 2012 at 06:27 AM CST #

Hello Sakis,

For both of those items, you'll need to use Component Architecture to modify the server in that way. I'm afraid I don't have specific details on the two items you're looking for.

For the title on the pages, that's actually defined as part of the skins and I do have a post on modifying and creating new skins - https://blogs.oracle.com/kyle/entry/customizing_layouts_and_skins_in. That can help get you started there.

For further help in Component Architecture, I would recommend attending the Oracle WebCenter Content 11g: Content Server Customization course through Oracle University.

Thanks,
-Kyle

Posted by Kyle Hatlestad on November 27, 2012 at 11:00 AM CST #

Hi Kyle,
Our requirement is:
1)We have to check in Primary files with .pdf and .doc extension.
2)And we have to restrict file size.

Can you please help on this..

Posted by vikas on April 05, 2013 at 07:21 AM CDT #

Hello Vikas,

Those requirements are not available out-of-the-box, but could be accomplished with a custom component.

Thanks,
-Kyle

Posted by Kyle Hatlestad on April 17, 2013 at 11:43 AM CDT #

HI KYLE,

I am completely new to custom component creation.
please will you do favour for me.
Is it possible for you to make it.

Thanks

Posted by vikas on April 19, 2013 at 04:20 AM CDT #

Hello Vikas,

I'm afraid I can't take requests for custom components. :-)

But we have a great team of consultants in Oracle Consulting Services and a lot of WebCenter certified partners that could help you out. Please contact your Oracle representative and they should be able to connect you to someone that can help you get a component written per your requirements.

Thanks,
-Kyle

Posted by Kyle Hatlestad on April 22, 2013 at 09:26 AM CDT #

Hi Kyle
Can I Add capture(scanning) using my profile the document into oracle ucm

Thanks

qais

Posted by qais on May 06, 2013 at 04:42 AM CDT #

Hello Qais,

No, not out-of-the-box. But if you are familiar with customizing UCM, you could add a button or link out to Oracle Distributed Document Capture from the UCM interface.

Thanks,
-Kyle

Posted by Kyle Hatlestad on May 06, 2013 at 09:29 AM CDT #

Thanks for the solution, it worked,i have removed the alternate file in the same way, but now it left with 2 horizontal rows (seperator bar). How to remove these two horizontal bar, keeping other horizontal bar ( top and bottom)

Posted by sumit on May 29, 2013 at 05:28 AM CDT #

Hello sumit,

Only with a custom component can the horizontal bars be removed. The HR tag is defined within the std_namevalue_separator resource include.

Thanks,
-Kyle

Posted by guest on May 29, 2013 at 09:17 AM CDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today