John6122514
Posts: 0
Joined: Wed Aug 07, 2013 7:10 pm

If Statement for REST service array field

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);

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

If Statement for REST service array field

Hi John,

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

Use 'value' instead of service.responsefield.

Return to “Issues”