I want to get a particular column value of the LAST row of the database collection and store it... How can I do so ?
I want to get a particular column value of the LAST row of the database collection and store it... How can I do so ?
Hello!
Please take a look here: http://devcenter.appery.io/documentat...
I have already looked into that... Please check my problem...
I need the values of the last row without any request... just response on a button click event.
Hi Abhigyan,
Generally update/create service returns only "_id" of created/modified row.
So you have to ways to get full data after service success:
1 Invoke "Read" service - with "_id" returned by "create/update" service. In this case app will send two request for this goal.
2 Implement custom Server script that will:
2.1. Create/update item.
2.2. After item is created/updated - get's this item from DB and return's received item as response. In this case app will produce just one request to the server.
Regards.
Like I dont have any _id or any data.
I click a button then I should get the last row _id from the specified collection.
How can I get the last row ?
Hi Abhigyan,
You can get last row with following way:
1 Open list service to the collection you need.
2 Navigate to "request" tab and add following parameters in "query string" section: http://prntscr.com/54u3sk/direct
limit = 1
sort = "_createdAt"
3 Navigate to "Test" tab. And click on "Test" button.
4 You will get only one item (last created). http://prntscr.com/54u49s/direct
See more about queries here: http://devcenter.appery.io/documentat...
Regards