D2 Autonaming depending on content size

regisroy
edited October 21, 2015 in Documentum #1

D2 4.5.0020

Hi,

I'd like to fill a property like 'a_status='MY_DOC_HAS_CONTENT' when user creates a document (import file or template applied to the new document) that has content.

I've created an Autonaming config :

'a_status' filled with value 'MY_DOC_HAS_CONTENT'

I've tried following D2 Contexts but no one matches my newly created document :

- dm_document where r_content_size > 0

- dm_document where (i_contents_id is not nullid or i_contents_id <> '0000000000000000')

- dm_document where r_page_cnt > 0

- dm_document where a_content_type='pdf'

Actually, the document is created without content. the content is added after D2 configuration applies.

EMC Support says that :

"worked as per design as the document created contentless"

Isn't there really no way to achieve that ?

Thank you

Regards,

Roy

Comments

  • EktaVegad
    edited September 1, 2015 #2

    Hi Roy,

    Try the below step,

    1. Apply default value template in creation matrix

    for eg. attribute1=not applied

    2. create one context with datatype & condition as attribute1=not applied

    3. create 2 auto naming , one for applying a_status='MY_DOC_HAS_CONTENT'

    and one for attribute1=applied (so that same context will not update auto naming again)

    Hope this will work

    Regards,

    Ekta

  • regisroy
    edited September 7, 2015 #3

    Hi Ekta,

    I'm not sure I understand the things you want me to try.

    I just want to have my attribute set when document HAS CONTENT

    Is it really what you were telling me to do ?

    Thank you

    Roy

  • EktaVegad
    edited September 7, 2015 #4

    Hi Roy,

    you can try

    data type: dm_document

    condition:

    r_content_size is nullint

    Regards,

    Ekta

  • regisroy
    edited September 8, 2015 #5

    r_content_size is nullint <=> r_content_size=0

    This does not work.

    And the reason why is that D2 sets content after configurations are applied (autonaming, autolink, etc.).

    I've been thinking about using $FILENAME but it works only when importing file, not whit checkout/checkin

  • abhi21_verma
    edited October 20, 2015 #6

    you also archive  following points

    1. create lifecycle and set some input condition like your type , r_content_size >00000, etc...
    2. if condition is matched then update a_status = ' document HAS CONTENT'
    3. this lifecycle used in your creation profile .
    4. at the time of import , lifecycle checked that  its size and type etc , if  input condition has satisfied then lifecycle update  a_status .
    5. if input condition has not matched then lifecycle not apply on that content and a_status not update this means its content less document/object

    Hope this will help you !

  • regisroy
    edited October 21, 2015 #7

    Hi!

    That sounds a good workaround except that lifecycle actions won't execute in the CONTENTLESS case.

    Consider I have 2 states :

    DRAFT (Start state) with some actions like "setProperties"

    VALIDATED

    I just need to set VALIDATED if document has content and let DRAFT if no content.

    If I set an entry condition for DRAFT state, lifecycle won't be applied

    A good thing would be to have entry condition with "If Then Else"

    I think I'll have to set a lifecycle batch

    Thanks for your help

    Regards,

    roy