Create a Variable Equal to an Associated Entity Value

0
I have an database entity call Accounts with an attribute of ACCOUNT_CODE. I have another database entity called Users with an attribute of USER_CODE.  There is also an AutoNumber attribute called USER_NUMBER. There is a 1..* association between Accounts and Users When I create a new User, I select the associated Account via a dropdown selection. The newly created User must have the USER_CODE with a value of USERx:ACCOUNT_CODE (i.e. USER10:ACCOUNT1 or USER5:ACCOUNT2) I am trying to write the Micro Flow to generate the USER_CODE but can’t get it right.  I can successfully generate the USERx portion by joining ‘USER’ + USER_NUMBER but I am unable to add the ACCOUNT_CODE. I think this is a result of ACCOUNT_CODE not being an attribute of Users but rather an attribute of the associated Account entity.   I would really appreciate any help as I am a Microsoft PowerApps citizen developer and I am pulling my hair out with getting this to work in Mendix.
asked
1 answers
1

It’s quite simple. Use an activity and configure as follows

  1. Change object
  2. Member: USER_CODE
  3. Value: $Users/NAME + ‘:’ + Accounts/ACCOUNT_CODE

 

But the fact you are using your own entities Users and Accounts and the naming of you attributes worries me more then the expression.

As a Citizen developer, take the following learning path first. And get a gist of how to setup your domain model and how to use your accounts. https://academy.mendix.com/link/path/31/Become-a-Rapid-Developer

answered