Hi everyone,
I am trying to create an advanced view according to this documentation Advanced views , this is my code:
{
"layers": [
{
"name": "VistaAvanzada",
"description": "AttributeJoin",
"adminLayerInfo": {
"viewLayerDefinition": {
"table": {
"name": "target",
"sourceServiceName": "TestJoinExpression_Tabla1",
"sourceLayerId": 0,
"sourceLayerFields": [
{
"name": "key1",
"alias": "key1",
"source": "key1"
},
{
"name": "date1",
"alias": "date1",
"source": "date1"
}
],
"relatedTables": [
{
"name": "joined",
"sourceServiceName": "TestJoinExpression_Tabla2",
"sourceLayerId": 0,
"sourceLayerFields": [
{
"name": "key1related",
"alias": "key1related",
"source": "key1related"
},
{
"name": "name",
"alias": "name",
"source": "name"
},
{
"name": "relatedExpression",
"alias": "SumNumsTest",
"expression": "Num1 + Num2",
"type": "esriFieldTypeInteger"
}
],
"type": "INNER",
"parentKeyFields": [
"key1",
"key2"
],
"keyFields": [
"key1related",
"key2related"
]
}
]
}
}
}
}
]
}For this test, I have created the fields Num1 and Num2, in both tables, because I am not sure how the expression works, however the expression field "relatedExpression" is not created, I can see the fields I declared, coming from both tables. That is, the view works for me as a union of tables, but I cannot create the additional field that corresponds to the expression.
I appreciate the help