Page 1 of 1

REST service query then create

Posted: Fri Nov 08, 2013 5:54 am
by m z

I have a query service to load an item from my collection. I'd like to update a few fields then call my create service to add a new item/row to the collection. Do I have to copy all items from the query service to local storage and/or components before I map them back to for the create service call? Or is there a simpler method (similar to an update service)?


REST service query then create

Posted: Fri Nov 08, 2013 5:57 am
by maxkatz

You probably don't need to save them all, just the once you need to update. It's really up to the app logic.


REST service query then create

Posted: Fri Nov 08, 2013 10:42 pm
by m z

What steps would I take? I'm thinking the following:

1) invoke query service
2) copy response (how do i do this?)
3) get updated fields from app UI
4) invoke create service with copy from 2) plus updated fields.


REST service query then create

Posted: Sat Nov 09, 2013 3:43 am
by Igor

Hello,

  1. invoke query list service
  2. map fields that you need to input element.
  3. on value change or button click, invoke update service.