My Oracle Support Banner

Cannot Join the Same Table More Than Once Using Primavera Data Service (PDS) (Doc ID 2889928.1)

Last updated on AUGUST 17, 2022

Applies to:

Primavera P6 Enterprise Project Portfolio Management Cloud Service - Version 19.12 to 22.6 [Release 19.12 to 22.6]
Information in this document applies to any platform.

Symptoms


When joining the same table twice using PDS the results are incorrect. Only the results from one table are returned.  A use case for joining the same table twice would be if two separate UDFs need to be included in the result set. For example, the following query contains two different UDF Types.The results of this query only show the results for one of the UDF Types.


 {
    "name": "Project Data",
    "pageSize": "10",
    "tables": [
        {
            "tableName": "RISK",
            "columns": [
                "ID",
                "NAME",
                "DESCRIPTION"
            ],
            "joinedTables": [
                {
                    "tableName": "PROJECT",
                    "columns": [
                        "ID",
                        "NAME"
                    ],
                    "joinCondition": {
                        "columnName1": "PROJECT.OBJECTID",
                        "columnName2": "RISK.PROJECTOBJECTID"
                    },
                    "condition": {
                        "operator": "AND",
                        "conditions": [
                            {
                                "columnName": "NAME",
                                "operator": "EQUALS",
                                "value1": "risk"
                            }
                        ]
                    }
                }
            ],
            "joinedTables": [
                {
                    "tableName": "UDFVALUE",
                    "columns": [
                        "UDFTEXT"
                    ],
                    "joinCondition": {
                        "columnName1": "UDFVALUE.FOREIGNOBJECTID",
                        "columnName2": "RISK.OBJECTID"
                    },
                    "condition": {
                        "operator": "AND",
                        "conditions": [
                            {
                                "columnName": "UDFTYPEOBJECTID",
                                "operator": "EQUALS",
                                "value1": "1593"
                            }
                        ]
                    }
                }
            ],
            "joinedTables": [
                {
                    "tableName": "UDFVALUE",
                    "columns": [
                        "UDFTEXT"
                    ],
                    "joinCondition": {
                        "columnName1": "UDFVALUE.FOREIGNOBJECTID",
                        "columnName2": "RISK.OBJECTID"
                    },
                    "condition": {
                        "operator": "AND",
                        "conditions": [
                            {
                                "columnName": "UDFTYPEOBJECTID",
                                "operator": "EQUALS",
                                "value1": "177"
                            }
                        ]
                    }
                }
            ]
        }
    ]
}

Result Set:
"RISK": [
  {
  "RISK.DESCRIPTION": null,
  "RISK.ID": "A1000Risk",
  "RISK.NAME": "A1000Risk",
  "UDFVALUE.UDFTEXT": "Green"
  },
  {
  "RISK.DESCRIPTION": null,
  "RISK.ID": "A2000Risk",
  "RISK.NAME": "A2000Risk",
  "UDFVALUE.UDFTEXT": "Red"
  }
]


Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.