Process Model Question and Output View

We have created a single process Model. We have two Data Type Entities (T_Proposals and T- Users). In this process model, we would like to Link the two Data Type Entities. In the Data Type Table, We have establish a Primary Key in the Proposal and a Primary Key for the Users. Each is represented as a Foreign key in each table. We have tried to use Multiple data store, we have tried to create two data stores and even tried using a sub process. Unfortunately, we have not been able to accomplish this task. Please advise

 In the end the goal is to be able to pull information from the Proposals and the Users into one report or to be able to show User Information on the Proposal  Record Summary View. 

 

Hope this explanation is clear. 

 

  Discussion posts and replies are publicly visible

  • I don't think I understand the problem.
    Is it that you are not able to query for the correct data in your process model, or is the problem with data relationships? Couldn't you create a view in the database that correctly links the users and proposals, and then just query that view in your report and summary view?
  • The Issue is creating the data relationships, We are unsure how to create the relationship in the data process modeler between the two Data Types,
  • Are you getting an error trying to save to the database (perhaps violating a foreign key constraint)? The solution Colton mentioned should work. Assuming you have all users already saved to a Users table in your database, populate your Proposals CDT with the appropriate primary key for the user who you are associating to the proposal. To get this data all together for your report, you write a view:

    create view proposals_v as

    select p.*,
    u.username,
    u.firstName,
    u.lastName
    from Proposals p,
    left join Users u
    on p.username=u.username;

    (This assumes that 'username' is the primary key field of your users table)

  • Hi,
    As per my understanding. U have a two tables :
    1. T_Proposals has a primary key and Foreign Key
    2. T- Users has a primary key which is Foreign key of T_Proposals.
    if this is the case, i believe the write to multiple data store entity will not work since it will through a foreign key constraint on T_proposals.
    What u need to do is user write to data store entity and persist T_USers you will get a primary key. Now map that primary key into T_proposals foreign key and try to persist to using write to data store entity.

    Please let me know if my understanding is correct.