This is the ODML code for example six from the Apps - Getting started article. You can copy & paste it to the APP Builder to try it out. There is one requirement for the example to work properly: You need to upload the dataset attached at the bottom of this article to ONE DATA. After that replace the "dataId" from this code with the id your uploaded data table has in ONE DATA.
{
"version": "0.1",
"pages": [
{
"id": "home",
"label": "Home",
"screens": [
{
"layout": "layout1",
"conditions": {
"syncSets": {
"testSyncSet1": {
"Country": {
"present": false
}
}
}
}
},
{
"layout": "layout2",
"conditions": {
"syncSets": {
"testSyncSet1": {
"Country": {
"present": true
}
}
}
}
}
],
"children": [
{
"id": "details",
"label": "Details",
"screens": [
{
"layout": "layout2"
}
]
}
]
}
],
"layouts": [
{
"id": "layout2",
"type": "fixedGrid",
"config": {
"dim": {
"x": 24,
"y": 24
},
"containers": [
{
"id": "tableContainer1",
"pos": {
"x": 1,
"y": 5
},
"size": {
"w": 24,
"h": 20
}
}
]
},
"placements": [
{
"containerId": "tableContainer1",
"elementId": "table1"
}
]
},
{
"id": "layout1",
"type": "fixedGrid",
"config": {
"dim": {
"x": 24,
"y": 24
},
"containers": [
{
"id": "tableContainer1",
"pos": {
"x": 1,
"y": 5
},
"size": {
"w": 12,
"h": 20
}
},
{
"id": "tableContainer2",
"pos": {
"x": 13,
"y": 5
},
"size": {
"w": 12,
"h": 20
}
}
]
},
"cellPadding": "0px",
"placements": [
{
"containerId": "tableContainer1",
"elementId": "table1"
},
{
"containerId": "tableContainer2",
"elementId": "table2"
}
]
}
],
"datasources": [
{
"id": "testSource",
"origin": "datatable",
"config": {
"schema": "table",
"dataId": "13b8c145-2beb-4d72-a6a5-9102ce84b744",
"dataOptions": {
"pagination": {
"type": "offset",
"page": 1,
"size": 10,
"totalPages": true
}
},
"filterOptions": {
"distinctValues": true,
"enabled": true
}
}
}
],
"syncSets": [
{
"id": "testSyncSet1",
"sources": [
"testSource"
],
"joins": [
{
"datasource": "testSource",
"columns": [
"Country"
]
}
],
"syncMap": [
{
"source": "testSource",
"targets": [
"testSource"
]
}
]
}
],
"elements": [
{
"id": "table1",
"type": "table",
"source": "testSource",
"syncSets": [
{
"syncSetId": "testSyncSet1",
"publishFilters": true,
"applyFilters": true
}
],
"config": {
"columns": [
{
"name": "Country"
},
{
"name": "Sales"
}
]
}
},
{
"id": "table2",
"type": "table",
"source": "testSource",
"navigation": [
{
"to": "home.details",
"label": "See Details"
}
],
"syncSets": [
{
"syncSetId": "testSyncSet1",
"publishFilters": false,
"applyFilters": true
}
],
"config": {
"columns": [
{
"name": "Country"
},
{
"name": "Market_Value"
}
]
}
}
]
}
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article