Add non persistent entity values to persistent entity with the UserID

I am new to Mendix. I created the excel import without issue to dump values into a non persistent TempStock entity. Through a microflow, I want to migrate those values to a persistent Stock entity but also match the emails in the non persistent TempStock entity with the User entity to add the UserID to the persistent Stock entity. I did get as far as create Stock list, iterate through and map out TempStock to Stock. Grabbing the UserID while matching emails and inserting into Stock entity I am a little confused. The import file does not have the UserID included in the file. It does have the email which is the unique identifier in this case. Match emails and insert the UserID with the appropriate values into the Stock entity. TempStock entity // import from the excel file - non persistent Stock entity // persistent where the values and UserID will exist User entity // where the UserID is stored and also the email to match to TempStock entity Thanks
1 answers

You can acces your User information by retrieving the current user in your microflow. The best way to do this is by creating a retrieve in your microflow with the following properties:

Retrieve: User from database Range: First XPath: [id = $currentUser]

The only problem is that you can't access the id, so I would suggest using something else like the Name or another unique identifier.