简体   繁体   English

如何使用他们的REST API检索在Zoho中输入的最后一条记录

[英]How do I retrieve the last record entered in Zoho using their REST API

From the help section REST API (View Records) I was able to retrieve all the records entered into my Zoho form in JSON format from my php script. 从帮助部分REST API(查看记录)中,我能够从php脚本中检索以JSON格式输入到Zoho表单中的所有记录。 They have a sample request there that I emulated. 我在那里模拟了他们的示例请求。

However, this returns the ENTIRE record set but I would like to retrieve only the last one entered and use it in my code. 但是,这将返回整个记录集,但我只想检索输入的最后一个并将其用于我的代码中。 I have not found any way to do this at all. 我根本没有找到任何方法可以做到这一点。 Downloading the entire JSON file of all records will be problematic as my data set grows. 随着我的数据集的增长,下载所有记录的整个JSON文件将成问题。

UPDATE: This is the request from HTML for retrieving the dataset. 更新:这是HTML检索数据集的请求。

    <form method="GET" action="http://creator.zoho.com/api/json/my_application_name/view/my_report_name">
    <input type="hidden" name ="authtoken" value="****">
    <input type="hidden" name ="zc_ownername" value="ownername">
    <input type="hidden" name ="scope" id="scope" value="creatorapi">
    <input type="submit" value="View Records">
</form>

Thanks 谢谢

You may want try set a criteria and use a date value, better still use the 'limit' and set value to 1: 您可能想尝试设置条件并使用日期值,最好还是使用'limit'并将值设置为1:

<input type="hidden" name="criteria" value="(StartDate == zoho.currentdate")">
<!-- below was tested and works -->
<input type="hidden" name="limit" value="1">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM