Page 1 of 1

newbie mapping question

Posted: Mon Jun 08, 2015 4:42 pm
by sdanigo

Hi,
when mapping data to a screen, how could I do 'computed' result:
for example I want to map Adress ZipCode and Town in one place on the screen ?

Thanks

Sylvain


newbie mapping question

Posted: Mon Jun 08, 2015 7:51 pm
by Alena Prykhodko

Hello,

Here you can find how to map data https://devcenter.appery.io/documenta...
To display result in one place you need to concatenate it with JavaScript.


newbie mapping question

Posted: Mon Jun 08, 2015 9:36 pm
by sdanigo

Hi Alena,

thanks, my problem is only to access the returned values.
I tryed

value=data['myField1']+' '+data['myField2'];
return value;

but it doesn't works


newbie mapping question

Posted: Tue Jun 09, 2015 10:28 pm
by Yurii Orishchuk

Hi Sylvian,

as i can see you trying to access some array data so i assume you have list/grid component and want mapping to iterate it with data and some label inside. If it's true here is a solution:

  1. Make link from $ response to grid/list-item component to iterate it.
    Details: http://prntscr.com/7f4x82/direct

  2. Click "JS" button on this link.

  3. Use following JS code:

    pre

    //Where "firstName" and "secondName" is your db goal fields.
    var name = data.firstName + "_" + data.secondName;

    //Where "labelName" is needed label name.
    Apperyio("labelName").text(name);

    /pre

    Regards.