Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

mapping problem

Hi,

I would like mapping to list. This is working, but i need use two fileds in one target component (checkboxitem) value. I try this, but dosnt work.

var id = value.id;
var str = value.er;

var n = $.inArray(id, str);

if (n -1) {
return true;
} else {
return false;
}

Please help me.

Thanks

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

mapping problem

Hello,

Could you send us values of the id and str variables?

Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

mapping problem

["5620ce27e4b034ce89efb683","561f90d2e4b0335a64ab4289"]

ID-s

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

mapping problem

What value does variable "str" have?

Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

mapping problem

I would like search id (from mapping) in the str ... If exist then checkbox value true ...

Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

mapping problem

er value : ["5620ce27e4b034ce89efb683","561f90d2e4b0335a64ab4289"]

this is an id "list"

Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

mapping problem

The solution:

https://getsatisfaction.com/apperyio/...

  1. mapping $i

    2 JS
    var iddd = value.id;
    var strr = JSON.parse(value.er);

    var n = jQuery.inArray(iddd, strr);

    if (n -1) {
    return n;
    } else {
    return n;
    }

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

mapping problem

Sorry, do you need further assistance?

Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

mapping problem

I solved :-) thanks

Return to “Issues”