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
  • I understand.

    My goal is to set the member value list to the same member the current user works for. Then the automatic permission of the selected member will restrict the permission of the document.

    Is there a different way to accomplish this goal?


    The trick is to link the mfiles current user to my Member User object so I can tell which company the active user works for and set permissions accordingly.

    I added User Account to the member user object and test class. But somehow I have to update the value of the User Account in the Member User object to the User Account in the Person object. How can this be done?



Reply
  • I understand.

    My goal is to set the member value list to the same member the current user works for. Then the automatic permission of the selected member will restrict the permission of the document.

    Is there a different way to accomplish this goal?


    The trick is to link the mfiles current user to my Member User object so I can tell which company the active user works for and set permissions accordingly.

    I added User Account to the member user object and test class. But somehow I have to update the value of the User Account in the Member User object to the User Account in the Person object. How can this be done?



Children
No Data