eascards
Posts: 0
Joined: Mon Jul 14, 2014 2:42 am

Update Service

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Update Service

Hello Eascards,

Could you please clarify your question in details?

eascards
Posts: 0
Joined: Mon Jul 14, 2014 2:42 am

Update Service

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...

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Update Service

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.

eascards
Posts: 0
Joined: Mon Jul 14, 2014 2:42 am

Update Service

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.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Update Service

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.

eascards
Posts: 0
Joined: Mon Jul 14, 2014 2:42 am

Update Service

Yes I have an an error now.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Update Service

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.

eascards
Posts: 0
Joined: Mon Jul 14, 2014 2:42 am

Update Service

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Update Service

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.

Return to “Issues”