Page 6 of 6

Mapping multiple responses from a service to the same component

Posted: Wed Jun 18, 2014 7:02 pm
by Chris McKenna6917608

Any chance of getting this in a tutorial? I would like to do the same thing. I am trying to follow, but i get a little lost after about 5 posts.

I want to map firstName and lastName from the database to a listItem Text .


Mapping multiple responses from a service to the same component

Posted: Thu Jun 19, 2014 12:38 am
by Yurii Orishchuk

Hi Chris,

Please follow these steps to understand how do it:

1 Open your service mapping.

2 Delete all links from this mapping.

3 Add in mapping following LSVs "firstName", "lastName". http://prntscr.com/3u8dxz/direct

4 Make following links: "firstName"(response)-"firstName"(lsv), "secondName"(response)-"secondName"(lsv). http://prntscr.com/3u8ekb/direct

5 Make mapping from some response field to your text component. http://prntscr.com/3u8fg6/direct

6 Click "AddJS" on the text component link. And fill it with following code: http://prntscr.com/3u8h78/direct

pre

var firstName = localStorage.getItem("firstName");

var lastName = localStorage.getItem("lastName");

var goalText = firstName + "" + lastName;

return goalText;

/pre

That's all.

Please follow this solution step-by-step. And don't confuse steps by order.

Regards.


Mapping multiple responses from a service to the same component

Posted: Sun Sep 28, 2014 11:45 am
by Abhijeet Singh

how do i add or substract two different vaules, one from a local storage variable and another from slider, and map it (request mapping) to a single component?


Mapping multiple responses from a service to the same component

Posted: Sun Sep 28, 2014 6:43 pm
by Alena Prykhodko

Hello,

This can be done with JavaScript https://getsatisfaction.com/apperyio/....


Mapping multiple responses from a service to the same component

Posted: Sun Jan 11, 2015 3:43 pm
by Ravenight

I have followed these instructions but if you add a list of people - with firstName, lastName - and connect the list (response) to the nameList so it populates with all the names, only the first entry's goalText is shown for all the entries on the list.

How do you combine firstName + lastName for each item in a list?


Mapping multiple responses from a service to the same component

Posted: Mon Jan 12, 2015 12:21 am
by Yurii Orishchuk

Hi Clif,

In new builder you can use following solution:

  1. Make link from "$" to needed label.
    Details: http://prntscr.com/5re17j/direct

  2. Click for "JS" on this link and use following JS code:

    pre

    //Where - "firstName" and "secondName" - are needed response parameters.
    var resultText = value.firstName + ", " + value.secondName;

    return resultText;

    /pre

    Regards.


Mapping multiple responses from a service to the same component

Posted: Wed May 04, 2016 6:09 pm
by Jean-Marc Nourel

Hi,

When doing so it's working perfectly to display my item and the created date.
But I would like now to have each one on a separate line.
How can I do it ?

Thanks


Mapping multiple responses from a service to the same component

Posted: Fri May 06, 2016 6:26 pm
by Serhii Kulibaba

Hello Jean,

Please use Newline symbol for that ("\n"), e.g. set in insead of the space from the suggestion of Yurii