Automatic filling of properties

Hello,

I'm following this document to enable automatic filling of properties: Automatic Filling of Properties.pdf . however, it doesn't explain how I can choose a specific value to be filled, it just explains how I can enable this feature. so, for example if I have multiple projects and each project has a different contact person, how do I connect them to each other to be automatically filled? I even tried "Configuration with Custom Vault Data" but there is no explanation for what the code numbers "1132", "1234", "1050","1122" represent in the code. 

scenario:

project                               contact person

IT 1                                   sam

IT 2                                    richard

how can I enable automatic filling if the user chose project "IT 1" the contact person will automatically be filled with "sam"?

Parents Reply
  • Contact Person does not have 2 IDs. In the document, there is a list with some examples. Properties can be listed with their Alias or their ID.
    In the example "ExcludedPropertyDefs": ["MF.PD.ContactPerson","1050","1122"] Contact person is listed with its Alias, and 2 other properties are listed with their IDs. You cannot tell from the example what 1050 or 1122 means. That is unique for the vault.

    You can add properties to include or exclude under Advanced Vault  Settings

    Advanced Vault Settings

Children
  • I followed the instructions under Configuration with Custom Vault Data ONLY. I added the namespace and added value. in the value I added this code:

    {
    "Common": {
    "AutoFillingOfProperties": {
    "Enabled": 1,
    "AskForConfirmation": 0,
    "IncludedPropertyDefs": ["<Project Property ID>"],
    "AutoFillLookupsOnly": 1,
    "Mappings": {
    "<Project Property ID>": {
    "IT 1": {
    "contact person": "sam"
    },
    "IT 2": {
    "contact person": "richard"
    }
    }
    }
    }
    }
    }

    I ran the code using ID values only and I also ran it by writing the values also ("richard" "sam" "project" "contact person").

    both ways didn't work even though I logged out from the user account. What am I doing wrong? Is there something else I should be doing? or is there another easier way to implement it?

  • Automatic filling of properties is based on the concept that when you add a value to the Project property on a document, then M-Files can automatically fill the Contact Person property on that document with values from the Contact Person property on the selected Project. 

    Your configuration shall not include specific Projects or Contact Persons. It shall only include the IDs or Alias of the Contact Person property. I am not sure where you got the idea to add Mappings? It is not mentioned in documentation - at least I have not found it anywhere nor ever used it in relation to automatic filling. Try removing your Mappings section from the configuration!

  • ahh okay I just got what you meant I'm sorry but I'm kind of new to m files.

    this is my new code:

    {

    "Common": {

    "AutoFillingOfProperties": {

    "Enabled": 1, "EnableForWeb": 1,

    "AskForConfirmation": 1,

    "ExcludedPropertyDefs": ["MF.PD.ContactPerson","1051"],

    "IncludedPropertyDefs": ["MF.PD.Customer", "1080"],

    "AutoFillEmptyFieldsOnly": 0,

    "AutoFillLookupsOnly": 0,

    "UseAppendWithMultiSelectLookups": 0 } } }

    however, I tried to test it in the user side by creating a customer then a contact person that is linked with the customer. now when I create a new project and select the same customer, the contact person doesn't automatically get filled. are there any steps that I might have overlooked?

  • Well, you entered ContactPerson in the ExcludedPropertyDefs section. That really means that you do NOT want ContactPerson to be autofilled!
    You should move it to IncludedPropertyDefs if you wish M-Files to fill that property for you.

    If 1051 and 1080 are not known properties i your vault, then you can leave them out of the configuration.