How to pass input from a reference selector to an object

0
Hello everyone, there are two entities in my app. "Mitarbeiter" is used for objects to store/display data of the employees of the firm. "Taetigkeit" is used for objects to store/display data of tasks each employee does. So it is an App where an employee can track their work and register each task that they have done. On the page Taetigkeit_NewEdit the employee should be able to fill in all the information about the task that was done; so what was the name of the employee, the e-mail adress, etc. and also the description (dt. Bezeichnung), the duration (dt. Dauer) and the date (dt. Datum) of the task. The fields "Name", "Nachname", "GID", "Email", "Department" and "Kostenstelle" should be selectable from the data that is already stored in the objects of the entity "Mitarbeiter". So i used a reference selctor for these fields. The problem is that the input from these fields isn't written to the new object "Taetigkeit" that is created when the user clicks the button "save".    How can I pass the input from the reference selector to the new object that is created?    
asked
3 answers
2

Hey Ines,

 

Do you really need to have the data 'double' in your application so and within the Taetigkeit and within the Mitarbeiter table?

If so you should retrieve the selected associated mitarbeiter in a microflow or nanoflow after save and use a change object action to change the fields on the Taetigkeit object.

However, if you only want to show the fields of Mitarbeiter in for example a datagrid or listview, you only have to use one reference selector which selects the Mitarbeiter on the Taetigkeit, after you can retrieve the fields over association.  This means that you can delete the attributes from Taetigkeit.

 

Good luck 

answered
2

Hey Ines,

First, why do you need to duplicate the data in two entities when you can just set the association?

The better way is to set a reference selector to select the Mitarbeiter and set the association.

If you need to duplicate it badly then you have only one reference selector and onChange MF to set the data of the Mitarbeiter in the Taetigkeit entity using that MF.

I recommend deleting the duplicated attributes from Taetigkeit entity.

answered
0

Hello,

thanks a lot for your answers, I appreciated that a lot! I managed to make it work. :)

answered