Hi guys, I've made a registration form for anonymous user. He can choose 2 different usertypes in the form and fill in his details to create an account for one of these roles (Student or Teacher). Now, after the registration is completed i need to change the attribute value of entity "UserStatus" to "Registered" IF the userrole was Student. And if the userrole was "Teacher" then the default value should be "Active". What i think i have to do is make a decision in the NewAccount microflow: If userrole picked is "Student" then attibute value of entity "UserStatus" is "Registered" else "Active". But i'm not sure if this is the right way or how to make this particular condition, maybe someone can help me out with that ? (Yes, ive seen the tutorials).
Yes this is the simplest way to do this.
However, if I understand correctly; an anonymous user can select the user role when registering?
If so; I suggest to replace that by adding a enumeration attribute, which can be selected. Base don selected value, set role in microflow. Also, do not use the User/Account entity to register, but a Non persistable entity, mimicing the user/Account entity. Commit Microflow will create the Usre/Account object and copy the set values (+ set role)