How can i create an object during the creation of an other object (not committed yet)?

Hi guys. I know that the question may seems strange! I have this domain model: I create the the object “SecurityCheck” through a data view. It is important to associate a “Passenger” in this creation, so i added a selector picker that select a “Passenger” saved in the database. How can i dynamically create a “Passenger” by clicking a button that opens the NewEdit passenger page?
1 answers

I would approach it as follows;

  1. add a microflow button on the location where user triggers the action.
  2. create a microflow
  3. first activity creates a passenger object
  4. second activity creates a SecurityCheck object
    1. change member: SecurityCheck_Passenger
    2. Value: $NewPassenger
  5. Show page
    1. Dataview
      1. datasource: context
      2. entity: SecurityCheck
      3. required input widgets for attributes SecurityCheck
    2. Nested dataview
      1. Datasource: Context
      2. Entity: path SecurityCheck_Passenger/Passenger
      3. Required input widgets attributes Passenger
    3. Default Save button will commit both objects