Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

List items can not be mapped with Array column in Update Request

Hi Support team,

I found the issue when I tried to map a List to an Array field in an Update request.

I have a field in a collection named 'subItems' which is an Array type and its values are like '[{"name":"item1","status":"false"},{"name":"item2","status":"true"}]'.

In a query service, I can map this field to a List.
However, when I try to map it backwards from the List to the request parameters in an Update service. Somehow, it doesn't allow the link.

See the screenshot below.

Thanks

Image

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

List items can not be mapped with Array column in Update Request

Hello Dongzhi,

You are right it is impossible, but you can use JS on this array request parameter and read all inputs into this parameter, e.g.:

var results = [];
$("[dsrefid=mobiletextinput]").each(function(){
results.push($(this).val());
});
return results;

here "mobiletextinput" - name of the components "input"

Dongzhi Yang7528784
Posts: 0
Joined: Mon May 11, 2015 6:28 am

List items can not be mapped with Array column in Update Request

Sergiy,

smart work around! It worked!

But i still don't understand why the mapping is not possible here. It seems so obvious to me it should work.

Return to “Issues”