The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Request Class and Document Class linking

Dear Experts,

 

I am facing hurdles in achieving the following task.

I have an object called “HR Request”, under that, I have one Request class “Test Leave Request”.

Second, I have one document class “Leave Request Certificate”.

Both these request class and document class has a workflow.

 

My requirement is to whenever a user adds a document with document class “Leave Request Certificate”.  Under Request class “Test Leave Request”.

 A property value of Request class “Test Leave Request”. should be enabled to yes.

The second requirement is that I need to check if Request class “Test Leave Request” has any document under document class “Leave Request Certificate”.

 

Please suggest to me how can I achieve this task.

 

Appreciate your help.

 

 

 

 Best Regards,

Amit Kala

  • From what I understood you can use Managed Properties from Compliance Kit to link the object and document in both directions. 

    When a document is added with the link to the object, the object can be automatically updated with a link to the document.

    So if the document property in the object is empty, this would mean that there is no document for that leave request object

  • Dear,

    Thanks for the reply.

    sorry, but i did not understand it fully.

    my request class and the document do not have a direct link. how can i link them

    Thanks

  • In my opinion, the best option here would be to create two "single-select choose from list" properties, The first property would be added to the Leave Request Certificate Document Class and lists the available "Test Leave Certificates" with a filter condition which only displays objects which  have an empty property (the second property). The second property would reside on the Test Leave Certificate class and would be managed by the 'Managed Properties' CK module.

    Radu is on the right track here.  "Managed  Properties" is capable of implementing a reference based Relationship.  There are instructions available in the Compliance Kit configuration manual.  Without getting into a full step by step design here you would set up a Reference Relationship to drive the second property's value.  Once configured, whenever a user creates a Leave Request Certificate Document and tags the Test Leave Certificate, the field referencing that Leave Request Certificate would get populated on the Test Leave Request and effectively remove it from the selectable Test Leave Requests available for subsequent Leave Request Certificate Documents.  

    If you wanted to enforce this further then you could consider utilizing another CK Module 'Unique Object Enforcement' which allows you to define various conditions which requires a certain level of unique-ness.

    Both of these modules are part of the CK Configuration Accelerator suite which is available universally so if you don't have it please let me know and we can get it to you.