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 Reply Children
  • 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
  • 0
    A Score Level 2
    in reply to Shoaib
    Hi Shoaib,

    can you pls upload screenshots of your query and the record definition. The error says that the index(1) is empty, which suggests that the data is empty and you are trying to pull one record from it.

    check your query rule if you're getting the data or datasubset?

    Thanks
  • 0
    Certified Lead Developer
    in reply to Shoaib

    Hi Shoaib

    Can you please attach the screenshot of your record configuration as well as your CDT structure so that it will be easy to understand the root cause.