Page 1 of 1

Modify JS while mapping service response

Posted: Thu Oct 23, 2014 6:43 am
by Suda

Hi,

I'm trying to edit the JS in the mapping window and I want to know how can I get the specific service response value before modifying it. Simply- I want to get the response and according to the value I need to return true/ false and map it to a page component visible attribute.

Say the Service response is having a field called intensity and according to the value I want to set my page component visibility. Thanks


Modify JS while mapping service response

Posted: Thu Oct 23, 2014 7:14 am
by Evgene Karachevtsev

Hello Suda,

You should map field "intensity" from response to the field "visible" of the desired component, click on js near mapped component and add the code:
preif ( value == 'required_string ){
return true;
} else {
return false;
}/pre


Modify JS while mapping service response

Posted: Thu Oct 23, 2014 12:02 pm
by Suda

Thanks for the quick & prompt response, that's awesome!