set a attribute value based on another attribute in the same entity
i have attribute with 2 columns. column1, column2 one two three i need to set column2 = 1 where column1=one AND column2=2 where column1=two , and so on. how to achieve this, need idea..
If you want to set the RoleName based on the value of Group, then I would do the following. Assuming that the Group value is of String.
I named My example entity DataImport
- Iterate over the list
- Check on the first possible value
- If true, set RoleName accordingly
- If false, Check on value 2
- … etc
- Commit the changed list after the loop
By the way, if you want to set the USERROLE for accounts in order to login in. Take a look at this learning path to understand how ACCOUNTS can be created automatically; https://academy.mendix.com/link/module/325/lecture/2498/8.7.1-Creating-Accounts
Rene van Hofwegen