PDA

View Full Version : rowEditor & HttpProxy Create API - preset multiple values



Jack_S
14 Oct 2009, 3:47 AM
Hello All,

I was hoping someone could answer a simple question to which I have not be able to find any relating thread.

I know that when you create a new recordType ({...}) you can have the HttpProxy create api return a string containing a server side generated id.

Now is the also possible with other fields? Here is an example.



CREATE [POST]
---------------
results{"disk_mgmt_id":"ext-record-158","disk_id":"","disk_name":"","description":"","inventory_id":970}

RESPONSE
------------
{success: true, "results":{"disk_mgmt_id":123}}


This correctly update the record and sets it's id (disk_mgmt_id) to 123 instead of 'ext-record-158'.
But I see to get an error when I return a response with multiple values such as:



RESPONSE
------------
{success: true, "results":[{"disk_mgmt_id":123},{"disk_name":"300GB SAS 15K"}]}


This would set the id to 123 and the name to 300GB SAS 15K. My reason for asking, is that I generate the name on the backend.

Thanks for any advise as to whether or not this can be done.

Jack