Deki
Posts: 0
Joined: Tue Apr 15, 2014 4:53 pm

Update Mapping Problem

Hi,
I am trying to do an 'update' to some input boxes. However, it is not working. Please see the image and my mappings. I have also created an event on a button click to invoke the update service. When I input some data and click the save button, nothing happens. Can you please tell me if my mapping is wrong or if I'm missing anything else? Please note that I have different users and each one needs to see and update their own data only. Thanks
Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Update Mapping Problem

Hello Deki,

Data update service works only for one item in column, so you shold add mapping to _id request field. More information about error you can see in browser consol.

Deki
Posts: 0
Joined: Tue Apr 15, 2014 4:53 pm

Update Mapping Problem

Hello Sergiy,

Can you explain a bit more what you mean by 'one item in column'? So which field should I map to _id request field? Also, I'm not sure what you mean by 'browser control'. Something like a debugger, like Firebug or Chrome Dev Tools?

Rik Knijff
Posts: 0
Joined: Fri May 02, 2014 5:15 pm

Update Mapping Problem

I have almost the same problem, only i don't have users and I mapped the _id to object_id but it still doesnt work!

Image

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

Update Mapping Problem

Hi Deki.

Let's make a bit clear your situation:

1 You have colletion "metrics".

2 For each user you have one row in this collection. For example:

for user with id "a1b" you have item in "metrics" collection {cholesterol: "a", glucose: "b", weight: "c"}

3 On your mapping we can't to find "userId" or similar field. http://prntscr.com/3fyx09/direct

Anyway, when you update an item in the collection you should pass to this service mandatory parameter "id". In your case it is "id" field for "metrics" item.

So you should:

1 store in the LSV "metricsId"

2 map this LSV to the "_id" in request. http://prntscr.com/3fyzez/direct

Also we can't see in your question how did you implemented link between user and metrics item(s). So if you would have a problem with a solution described above you should to provide us this information. Perhaps screen shots with users and metrics collection.

Regards.

Return to “Issues”