Page 1 of 1

If Statement for REST service array field

Posted: Wed Nov 13, 2013 6:33 am
by John6122514

I am trying to set an if statement in a field that is being populated from a REST service. The REST field is part of an array, but I am only need the information changed from one field.
Here is the javascript. Where and how do I add it to the project?

var tt = service.responsefield;
var x="";

if (tt=7){
x="guest";
}
else
{
x="not";
}
Appery(labelfield).text(x);


If Statement for REST service array field

Posted: Wed Nov 13, 2013 6:59 am
by Kateryna Grynko

Hi John,

http://docs.appery.io/documentation/u...

Use 'value' instead of service.responsefield.