Record Type Two Tables

I'm new to appian and hope people can help with my newb question.

Tables Involved: Project, Request

Project Fields: projectId (PK), projectName

Request Fields: requestId (PK) , dateRequested, projectId (FK)

I'm currently at the record type that I have for Request table. Now, I want to display the projectName field from the Project table in this Reqeust record type. How do I do that? Is the PK-FK relationship enough to do it?

  Discussion posts and replies are publicly visible

Parents
  • You can create a view in the database that joins Request and Project tables on projectId. This view can include columns from both tables. 

    Now source your Appian record from this view instead of Request table.

    -- Sample Database View code (Note that this syntax is for Oracle DB, syntax may slighty differ for other databases)
    
    create or replace view PROJECT_REQUESTS as
    select r.requestId,r.dateRequested, p.projectId, p.projectName
    from Project p
    join Request r on r.projectId = p.projectId;

Reply
  • You can create a view in the database that joins Request and Project tables on projectId. This view can include columns from both tables. 

    Now source your Appian record from this view instead of Request table.

    -- Sample Database View code (Note that this syntax is for Oracle DB, syntax may slighty differ for other databases)
    
    create or replace view PROJECT_REQUESTS as
    select r.requestId,r.dateRequested, p.projectId, p.projectName
    from Project p
    join Request r on r.projectId = p.projectId;

Children
No Data