Edit Record - CSV Format
Zoho Creator CSV - RPC Web API allows client applications to update records from a Zoho Creator form, using the HTTP POST method. The
records that satisfy the given criteria will be updated. You can
specify multiple criteria using "AND"/ "OR" operator. In return, the
user gets a formatted
CSV response from the called method.
Who can update a record ?
- Application owner with valid API Key
- Shared users with valid API key and access permissions to edit the view
Update record by application owner
Update record by shared user
Update Record by Application Owner
Request URL
The request url to add, delete or update a record in csv format is given below:
http://creator.zoho.com/api/csv/write/apikey=[APIKEY]&ticket=[Ticket]
Request Format
The
request parameters comprises of comma separated values to be
specified in the following format:
<Application
Name>,<Form Name>,<Operation Type>
<Criteria Column Name >,<operator><value>.,
setColName,newValue
<setColumnName>,<newValue>
where,
<Application
Name> :Name of the application in which the record must be edited.
<Form Name>: Name of the form in which the record must be edited.
<Operation Type>: The operation type to edit an existing record is "Update".
<Criteria Column Name >: The column name used to specify the update criteria.
<operator>:The operator used in the criteria. The following operators are supported:
- Equals
- NotEqual
- Before
- After
- LessThan
- GreaterThan
- LessThanOrEqual
- GreaterThanOrEqual
- Contains
- NotContains
- StartsWith
- EndsWith
<value> : The criteria column value
<AND or OR> : AND/OR operator to specify more than one criteria
<Set column name>: The column name to be updated
<New Value>: The new value to be updated.
Note:
- Only Deluge Script names must be specified for form names, field names and application name. Refer http://creator.zoho.com/api/referenceto view the list of
applications created, the form names and field names used in each
application and the deluge names.
- The criteria must end with a dot (.)
- Each line must end with a line seperator.
- Field values with special characters must be specified within double quotes.
- Multiple list values must be specified within double quotes with
each value seperated by a comma.
Sample Form (POST Method Format)
<form method="POST" action="http://creator.zoho.com/api/csv/write/apikey=[APIKEY]&ticket=[Ticket]">
<input type="hidden" name="CSVString" value="CSV String in the format as specified in the Request format">
<input type="submit" value="Sumit CSV String">
</form>
Sample Request
1. Sample request with single criteria
sample,Employee_Form,Update
Name,Equals,Henry.,
setcolname,newvalue
Name,Hilmer
2. Sample request with multiple criteria using AND operator.
sample,Employee_Form,Update
Joining_Date,GreaterThan,20-Apl-2006,AND,
Basic,LessthanOrEqual,10000.,
setcolname,newvalue
Basic,20000
3. Sample request with multiple criteria using OR operator.
Sample,Employee_Form,Update
Name,Equals,Kingsley,OR,
E_mail,Equals,kingsly@gmail.com.,
setcolname,newvalue
Address,India
4. Sample request with multiple criteria and multiple set column name.
sample,Employee_Form,Update
Name,Equals,John,AND
E_mail,Equals,John@gmail.com.,
setcolname,newvalue
Address,India
Qualification,M.C.A
Response Format
The
request parameters comprises of comma seperated values. The
line-wise parameters to be specified is given below.
Form
Name, Operation
<FormName>,Update
Status, Criteria
<Success/Failure><Criteria SET columName=Value >
If
there is an error in the request format, the corresponding error code
with the error message will be displayed. Please refer the topic, Error codes and description, to
learn about the list of error code displayed.
If the record is added to the database, the response message will be displayed with status as "Success".
Sample Response
The
following is the sample response for the above method:
Form Name, Operation
Employee_Form,update
Status,Criteria
Success,[Name Equals Henry SET Name=Hilmer ]
Update Record by Shared User
Request URL
The request url to update a record in csv format is given below:
http://creator.zoho.com/api/csv/write/apikey=[APIKEY]&ticket=[Ticket]
Request Format
The
request parameters comprises of comma separated values to be
specified in the following format:
<Application
Name>,<View Name>,<Operation Type>
<Criteria Column Name >,<operator><value>.,
setColName,newValue
<setColumnName>,<newValue>
where,
<Application
Name> :Name of the application in which the record must be edited.
<View Name>: Name of the view in which the record must be edited.
<Operation Type>: The operation type to edit an existing record is "Update".
<Criteria Column Name >: The column name used to specify the update criteria.
<operator>:The operator used in the criteria. The following operators are supported:
- Equals
- NotEqual
- Before
- After
- LessThan
- GreaterThan
- LessThanOrEqual
- GreaterThanOrEqual
- Contains
- NotContains
- StartsWith
- EndsWith
<value> : The criteria column value
<AND or OR> : AND/OR operator to specify more than one criteria
<Set column name>: The column name to be updated
<New Value>: The new value to be updated.
Note:
- Only Deluge Script names must be specified for view names, field names and application name. Refer http://creator.zoho.com/api/referenceto view the list of
applications created, the view names and field names used in each
application and the deluge names.
- The criteria must end with a dot (.)
- Each line must end with a line seperator.
- Field values with special characters must be specified within double quotes.
- Multiple list values must be specified within double quotes with
each value seperated by a comma.
Sample Form (POST Method Format)
<form method="POST" action="http://creator.zoho.com/api/csv/write/apikey=[APIKEY]&ticket=[Ticket]">
<input type="hidden" name="CSVString" value="CSV String in the format as specified in the Request format">
<input type="hidden" name="zc_ownername" value="name of the Application Owner">
<input type="submit" value="Sumit CSV String">
</form>