How to display data in record type from two tables?

I want to display data in single record type from multiple tables

  Discussion posts and replies are publicly visible

Parents
  • Hi Muhammad,

    As suggested, you can create view in database and its corresponding cdt in Appian, Record type will point to View Datastore Entity,
    View definition will contain data from both tables, you can make use of Analytical function in SQL if table has one to many relationship.

    Thanks
    Namrata
  • Hi Namrata,
    I have successfully created a view in database and a CDT for this view, but I am having trouble linking this CDT with the View. Can you please tell me how to add this View in DSE? cause when I add entity with this new CDT in DSE it creates a new table instead of linking it with the view that I have created in the Database
  • +1
    Certified Lead Developer
    in reply to Shoaib

    Hi

    Can you please download the xsd of your CDT and check whether @entity annotation refers to the same view which you have created in DB or not.

    Also if this doesn't work, try downloading the DDL script from Data store entity design object and check the view name it's going to create and check whether this name and your view name matches or not.

    Also make sure, you have created the view under the same schema which is linked to your data store entity design object.

    Still if you are unable to resolve this issue, I recommend, please upload your CDT here as well as your View name ( AVAILABLE in DB) so that practitioner can help you to resolve this issue.

    Also make sure, you have defined any one of the field of your CDT field as Primary key (but not Auto Increment) otherwise, while publishing the data store it will create a column named as Id (Primary key)

    Hope this helps.

  • HI aloks176 ,
    Thank You very much for helping me out. I am able to get the data from the view via query(for RECORD TYPE), now I am getting this error in Record List of the Record Type

    "Error Evaluating UI Expression
    Invalid index (1) for list: valid range is empty"

    Can you kindly help me fix this error?

    Thanks,
    Shoaib
Reply Children