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

Get properties of an existing object in another metadata card

Hi everybody. I need some help please.
I have an object in my metadata card, and I would like to get the properties of this object.
How could I do this?

I will give an example. I have a class called "Invoice". I have some properties in the "invoice" class: number, date, amount and creator.
"Creator" is an object with the name, the ID, and the cell phone of an employee.
How could I please get the creator info in the invoice metadata card?
I hope it's clear enough. Thanks for your help!

  • In an M-Files view of the world you typically would not do this. If you need to view the creator details then you would click on the object in the invoice metadata card and view it separately.

    I concede that this is not what users want sometimes, though.

    You have a couple of options:

    1. You "copy" values from the creator across to the invoice. You could create dummy properties ("Creator cell phone") and use the "simple concatenation of property values" to populate the value from the related object. The problem with this "copy" is maintaining it, though: if the cell phone number changes then the invoice will only be updated if it's modified; the value isn't "live".

    2. You write a user interface extension ("UIX") that adds a separate/new tab which is shown when an invoice is selected. This tab could be programmed to display data from the invoice and creator directly. Unfortunately this is not a small amount of code, so it unrealistic for installations that do not have access to software development resources.

    Regards,

    Craig.
  • Hi GraigHawker. The first option is perfect to me,
    I want to create a log and I don't really need the "live" option.
    I tried it and it works perfectly!
    Thank you so much for your help
  • Hi,

    I'm in a same case but i'm not a better developper....and my english is not so good !

    It is possible for you to post the script ?

    Thanks a lot

  • Hi 

    I used for such cases the managed properties (autocalculated properties) of the compliance kit (free configuration accelerators - no paid license needed). 

    The disadvantage is the same - no auto recalculation of the property. Only if you change anything on the invoice, this property will recalculate the value automatically. 

    Let's say if you change the workflow status of the invoice and in the meantime a creator info has changed, M-Files actualizes the creator info on the invoice metadata card.