Evangelos Malandrakis
04/18/2024, 2:39 PMW1
) and a child workspace (W2
), where W2
is a child of W1
.
• UDF Filter: The UDF filter (F1
) is set up in W2
for a specific user.
• Operations: While creation (POST) and deletion (DELETE) processes are functioning correctly, attempting to replace F1
(PATCH) with a different definition results in the error below:
{
"detail": "Some of given referenced 'labels' entities do not exist. Not existing IDs: [Identifier(TABLE_NAME.COLUMN_NAME)/Workspace(W2)]",
"status": 400,
"title": "Bad Request",
"traceId": "871d31999981119188f5b2f971941fb9"
}
When I apply the same exact setup with F1
(for the same user) in W1
, the PATCH operation works as expected without any issues.
Could someone please assist in resolving this? Thanks!Francisco Antunes
04/18/2024, 5:59 PM"maql"
object - from our logs, the errors is related to a Label that doesn’t exist in the workspace - so there’s a possibility of a typo, for example.
Another possibility: do you have any other Filters on the Parent Workspace W1
that would remove this label from child W2
? It could definitely cause this issue and explain why the filter works on the Parent (because it exists there, but another filter, or the same one, makes it not be available on the Child, leading to the issue).Evangelos Malandrakis
04/19/2024, 8:00 AMF1
at the child workspace W2
with the following request body:
{
"data": {
"type": "userDataFilter",
"id": "udf_evangelos.malandrakis.sales_ws_dev.sme",
"attributes": {
"maql": "{label/D_CHARGE_POINT_OUTLETS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_CHARGING_AGREEMENTS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_SITES.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_SPOTS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_AGREEMENTS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_DEBTORS_SCD.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\")"
},
"relationships": {
"user": {
"data": {
"id": "evangelos.malandrakis.sales",
"type": "user"
}
}
}
}
}
For the sake of simplicity, I reduced the MAQL to a smaller subset and applied only this change:
{
"data": {
"type": "userDataFilter",
"id": "udf_evangelos.malandrakis.sales_ws_dev.sme",
"attributes": {
"maql": "{label/D_CHARGE_POINT_OUTLETS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\")"
}
}
}
The simplified MAQL includes only a part of the previous MAQL.
However, I received the following error:
{
"detail": "Some of given referenced 'labels' entities do not exist. Not existing IDs: [Identifier(D_CHARGE_POINT_OUTLETS.SITE_ID)/Workspace(dev.sme)]",
"status": 400,
"title": "Bad Request",
"traceId": "a41ca6482d5d6460d3178b416de3f7d3"
}
When I apply the same procedure to the parent workspace W1
, the PATCH operation works as expected.
Since the filter in the parent workspace W1
doesn't affect these labels, and given that the initial UDF was created successfully, shouldn't a "subset" of it also work without issues?Francisco Antunes
04/19/2024, 12:33 PMEvangelos Malandrakis
04/19/2024, 1:30 PM