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

Put a default value list value based on the current users

Hi!
I've search all over the community but did not find the answer.

Here's the context :

I have an Object named Employee, for who I know his Office and his name.
Each M-files users is automaticaly created from this list.

When a user creates a new object named Assignement using a specific class, this class has also a property named Office.
By default, I would like to put the Employee's office as the default value. But the value could be modified if it's not the correct one for the user.

Automatic value of the property definition does not allow the user to change the value while he is creating the object.

So I'm not sure how to do this?

Thanks for your help!
Parents

  • Almost there!

    I made changes you suggested and now it does set the "Member User" property on the class. But, the "Member" property does not automatically populate to the member the user works for.

    If I turn off the rule and manually enter the Member User, then the Member property is set correctly.

    It seems that the rule does not trigger the member property to update. :(


    I think we can get you there. I reconstructed your problem and in my case it also broke the automation that was there before. However, we can make advantage of the fact that Member User is a subtype of Member in your scenario. So what you could try is to add the "Member" property to your rule and give it a dynamic value. This time it has to be a concatenated one: The first element being the Custom Placeholder you created, the second one being the "owner" property. I tested this and it worked.


    If I can get the rule to work, then I will need to write code to update the m-files user property on the member user object when a new mfiles account is created. I have over 600 users so this cannot be a manual process.

    Maybe you can avoid this. I only suggested the "M-Files User" property because I knew for sure that it works because I used it myself. However, you could use any other property to achieve your goal that makes reference to the same pool of M-Files users that this prop makes. If you already have one of these props on your Member User class that is populated, you could also use that one (for instance, I'm not sure about your "User Account" property - what does it select from? Wouldn't that be a suitable candidate?)
Reply

  • Almost there!

    I made changes you suggested and now it does set the "Member User" property on the class. But, the "Member" property does not automatically populate to the member the user works for.

    If I turn off the rule and manually enter the Member User, then the Member property is set correctly.

    It seems that the rule does not trigger the member property to update. :(


    I think we can get you there. I reconstructed your problem and in my case it also broke the automation that was there before. However, we can make advantage of the fact that Member User is a subtype of Member in your scenario. So what you could try is to add the "Member" property to your rule and give it a dynamic value. This time it has to be a concatenated one: The first element being the Custom Placeholder you created, the second one being the "owner" property. I tested this and it worked.


    If I can get the rule to work, then I will need to write code to update the m-files user property on the member user object when a new mfiles account is created. I have over 600 users so this cannot be a manual process.

    Maybe you can avoid this. I only suggested the "M-Files User" property because I knew for sure that it works because I used it myself. However, you could use any other property to achieve your goal that makes reference to the same pool of M-Files users that this prop makes. If you already have one of these props on your Member User class that is populated, you could also use that one (for instance, I'm not sure about your "User Account" property - what does it select from? Wouldn't that be a suitable candidate?)
Children
No Data