Page 1 of 9

Update Service

Posted: Mon Jul 21, 2014 8:07 pm
by eascards

So what I have going on is a form the a user fills out. Then it appears in a collapsible list. In that list, some of that information is displayed with labels and some with inputs. I want what is displayed in inputs to be able to be changed. So basically, the user can add or change text and it sends it to a database to change it.

This is the form that is filled out to get initial info to database:
Image

This is what it looks like after the data base receives it:
Image


Update Service

Posted: Mon Jul 21, 2014 8:25 pm
by Evgene Karachevtsev

Hello Eascards,

Could you please clarify your question in details?


Update Service

Posted: Mon Jul 21, 2014 8:33 pm
by eascards

Ok so this is what I want to happen.

  1. There is a form on a panel that a user fills out.

  2. The information from that gets pushed to a database.

  3. From the database it is listed on the main screen in a collapsible block.

    Now here is where I begin to need help.

  4. When I test the app I can type in those inputs.

  5. By clicking the update button it should go back to the database to update it but it doesn't.

    Here is my mapping:

    Image

    I shared the app with you so if it helps you take a look at it like that, feel free. It is called The Calving Book. Shared several days ago...


Update Service

Posted: Tue Jul 22, 2014 1:42 am
by Yurii Orishchuk

Hi Eascards,

Please specify how we can get your form in panel.. I've checked your app but could not find a way to do it.

Regards.


Update Service

Posted: Tue Jul 22, 2014 2:03 am
by eascards

After you sign in (username: jane pw:123), there is a button in the footer called "Add Calf". If you click there, it will open the panel.


Update Service

Posted: Tue Jul 22, 2014 3:02 am
by Yurii Orishchuk

Shawn,

You need:

1 Add "itemId" label inside collapsible item.

2 In "list" service mapping link "_id" property to the component "listId" from 1st step.

3 In "update" service mapping link "listId" component from 1st step to request parameter "_id".

Now you have "400" error on "update" request:

http://prntscr.com/452d7p/direct

After you will get this request work.

Regards.


Update Service

Posted: Wed Jul 23, 2014 11:22 pm
by eascards

Yes I have an an error now.


Update Service

Posted: Thu Jul 24, 2014 3:52 am
by Yurii Orishchuk

Hello,

Do you need futher help?

If so, please describe what you have try so far and what problem you have now.

Also make screen shots to be clear.

Regards.


Update Service

Posted: Thu Jul 24, 2014 2:03 pm
by eascards

I tried to do what you told "Shawn" to do above. I tested it and got some sort of 400 error like you mentioned so it still doesn't work. Image Image Image


Update Service

Posted: Thu Jul 24, 2014 10:36 pm
by Yurii Orishchuk

Hi eascards,

Please follow these steps to get it work:

1 Add to your "update" button "click" event handler with action "Set local storage variable".

pre

Variable name = "itemId".

Bind to component - checked.

target Component - "itemid".

Property name - "text".

/pre

See details: http://prntscr.com/460t4j/direct

2 Open your "update" service mapping.

3 Delete link from "itemId" component to "_id" request parameter.

4 Add link from "itemId" LSV to "_id" request parameter. http://prntscr.com/460u4e/direct

That's all.

Regards.