Doubt with mapping

Hello,

I'm creating a Registration page.

I am unable to get that what to keep in source and what to map.

If I assign like this 


Then I get this error



Please give me some suggestion to fix this issue..

Thank you,

Tapas Pattnaik

mappinglogic.JPG

Hi Tapas,

Good afternoon!

From the looks of it, I think you lack the IF condition, to validate if the User Id already exists in the User entity, if such is True, you should have an Update branch/logic.

I assume that your test data is already registered in the User entity and you are using the "CreateUser" action, it will throw that exception.

Hope this helps,

Kind regards,

Chris

mvp_badge
MVP

Hi ,,

find the attached oml it will help you.

i think you pass some id it should be nullidentifire when create user.


Hope this will help you.

Regards

Rahul

TestForm.oml

Hello Rahul,

Thank you for the .oml file but I want to say that in my project User2's Data type is set to User identifier   so that there could be 1:1 realtion between User2 and User .

In User entity i wanted to add attributes like:

 -FirstName

-LastName

-Training_Id(Forget about this for now)

I can't add this since User is a system entity which is uneditable. so that's why i created User2 

So during registration UI i could assign Firstname and lastname

Please help me with this.

Looking forward to your reply

Thank you,

Tapas Patnaik

Hi Tapas,

Tom's suggestion is the right approach. You may find sample on this documentation.

Create a One-to-One Relationship - OutSystems 

Kind regards,

Chris

Hello Chris,

I have done with one to one relationship already. but the question is what to pass in the given picture.

Thank you,

Tapas

Champion

Hi Tapas,

What is the value of User2.id?  I suppose User2 tables id type is User Identifier too. And you should pass the Id already in User Entity.

Kind regards,


Hi Tapas,


i you are really brewing your own register page for new user, and above screen is to create a new user in your system, then you obviously have to first do the CreateUser, that will return you with an id, and that would be the id to pass into the CreateUser2.


Might I also suggest to not call it User2, but maybe something like UserExtension.


Dorine

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.