issues in ALTER DB Table in MCS - Mobile, Intelligent Bot, and Mobile Analytics

Hi Sir I am able to create the  database table using the Database Management APIused the below shown json for that: {  "name" : "Movies",  "columns": [  {  "name": "title", "type": "string", "size": 50  },  {  "name": "synopsis", "type": "string"  },  {  "name": "inTheaters", "type": "boolean"  },  {  "name": "releaseDate", "type": "dateTime"  },  {  "name": "runningTime", "type": "integer", "size": 3  },  {  "name": "poster", "type": "binary"  },  {  "name": "totalGross", "type": "decimal", "size": 10, "subSize": 2  }  ],  "primaryKeys" : [ "title" ],  "requiredColumns" : [ "title", "releaseDate" ]} My Question is , Now I want to Alter the table using custom API.I am using below shown'/mobile/custom/task/AlterTable' , function(req,res){            var optionsList = {                uri: '/mobile/platform/database/sql',                headers: {                    'Oracle-Mobile-SQL':"ALTER TABLE Movies ADD fieldX Varchar2(35)"                    //'Oracle-Mobile-SQL':"alter table 'Maintenance_Incidents' add constraint fk_title FOREIGN KEY (title) references Movies (title) initially deferred deferrable"                }            };    ,            function(error, response, body) {              var message = error ? error.message : body;              res.status(response.statusCode).send(message);              res.end();            });        }); I am getting 500 INTERNAL_SERVER_ERRORCan you please guide me what is wrong in this.And, how can I add the various constraints on the table. Is it possible using the Alter statement. thanks & regardsDeepti

Executing DDL through the SQL api is not currently supported in DB API.  Cheers. Peter


How to use Detail Table(with RowExpander) if my JSON data format is different from cookbook example

I am trying to do the same thing as Detail Table example here: json data format for each row is like this:{"attr": {"id": "t1",  "name": "Task 1",  "resource": "Larry",  "start": "1/1/2014",  "end": "10/1/2014"  },  "children": [  {"attr": {"detail": "Various coding subtasks",  "complete": "20",  "incomplete": "80"  }  }  ]  } But my json data returned from my ajax call is like this(one record, for example), and I want to show mapping table(can be multiple entries) in the EXPANDED ROW:{        "id": "42bca5a1-62a6-4410-ae8f-8f4d7b45017f",        "number": 0,        "type": "PUBLIC_16BIT",        "description": "string",        "asnMapping": [            {                "regionId": "region_1",                "datacenterId": "datacenter_1",                "deviceRole": "DCI"            }]}        Is there any way I can still use the Detail Table the way shown in the cookbook example (link at the top)? I tried to do something same as the example shown(where "response" is the data returned from ajax call):var datasource = new oj.FlattenedTreeTableDataSource(new oj.FlattenedTreeDataSource(new oj.JsonTreeDataSource(response, options)));But lot of errors, table won't load.
as part of your success callback function in your AJAX call, restructure your JSON data into the proper structure.  Your fields can stay the same of course, but the attr and children structure is expected by the treedatasource

CollectionTableDataSource keeps polling for data

Hi, I have a problem with the CollectionTableDataSource. I use the model and collection api to get data from ORDS. This all works well, and I can display the data in an ojTable. However, when no data is returned (0 rows returned), I stumble on to a problem: The table displays correctly that there is 'no data to display', but when looking at the network tab, I can see that the service is endlessly being polled for new data. This only happens when the collection is set to the CollectionTableDataSource. How can I stop this from happening? This is the empty result ORDS sends back when there aren't any rows available:{  "items": [    ],  "hasMore": false,  "limit": 25,  "offset": 0,  "count": 0,  "links": [  {  "rel": "self",  "href": "https:\/\/<ipaddress>\/ords\/eloquasmsapp\/connections\/?q=%7B%22co_customer_id%22:300%7D"  },  {  "rel": "edit",  "href": "https:\/\/<ipaddress>\/ords\/eloquasmsapp\/connections\/?q=%7B%22co_customer_id%22:300%7D"  },  {  "rel": "describedby",  "href": "https:\/\/<ipaddress>\/ords\/eloquasmsapp\/metadata-catalog\/connections\/"  },  {  "rel": "first",  "href": "https:\/\/<ipaddress>\/ords\/eloquasmsapp\/connections\/?q=%7B%22co_customer_id%22:300%7D"  }  ]} screenshot from the network tab in netbeans: Has anybody experienced the same problem? Any help would be greatly appreceated!

oj-table not displaying all rows

Hi,  datacollection that needs to be shown is being fetched from a rest end point. From browser console/network/xhr,  I can see all that data gets downloaded.. like 24 rows. Only 8 rows are displayed in the table. oj-table configuration is as below: <oj-table id='table' aria-label='UnAvailable Endpoints'          data='[[epunavailableValue]]'           columns-default.sortable='enabled'           columns='[ {    "headerText": "col1",    "field": "name"  },  {    "headerText": "col2",    "field": "type"  },]'  style='width: 100%; height:100%;'></oj-table> Please let me know what could be the issue here. Thanks# V.Chandrashekar
I got this working. The idAttribute mentioned was not unique and hence the problem. ThanksV.Chandrashekar

How to get multiple rows via Database Access API in Custom Code

Hi Experts,    we want to retrieve multiple rows from one table from MCS internal database, i go thru the APIs but seem just have get a row or get all rows       database.get(table, keys, options, httpOptions): Retrieves a row from a table.       database.getAll(table, options, httpOptions): Retrieves specified fields from all rows in a table.     in bellowing response , we just need to get these rows ( 'employeename = owen') rather than all rows.{  "items": [    {      "id": 2,      "status": "PENDING",      "description": "Zhiyu水泵保修",      "employeename": "zhiyu",      "createdatatime": "2017-02-21T09:51:45.699+00:00"    },    {      "id": 3,      "status": "PENDING",      "description": "this is desc1",      "employeename": "zhiyu",      "createdatatime": "2017-02-21T10:01:48.612+00:00"    },    {      "id": 4,      "status": "pending",      "description": "what's up",      "employeename": "owen",      "createdatatime": "2015-07-20T14:37:24.000+00:00"    },    {      "id": 1,      "status": "PENDING",      "description": "again test",      "employeename": "owen",      "createdatatime": "2017-02-21T09:33:48.144+00:00"    }  ]}
Hi Owen The OTN Forums have identified you as an Oracle employee.  Please post to the internal forums, this public forum is for customers. Regards, CM.
Hi Chris,    could you guide me how to access the internal forums? thanks
Not on the external forum I can't. Please email me.CM.

REST API call - Pick slip Lines not returning the details

Hello, I am trying to read the pick slip lines using the below REST call  this is returning the below value. can anyone help to read the pick slip lines? {    "items": [],    "count": 0,    "hasMore": false,    "limit": 25,    "offset": 0,    "links": [        {            "rel": "self",            "href": "",            "name": "pickLines",            "kind": "collection"        }    ]}