Page 2 of 2

Database if else query help

Posted: Mon Mar 16, 2015 12:29 pm
by Egor Kotov6832188

Hello Bill,
try next code:
var found = false;
for (var i=0;i is last service you are trying to call, place exact name, cause it case sensitive.


Database if else query help

Posted: Mon Mar 23, 2015 7:34 pm
by Bill7270109

Thanks Egor

We feel stupid but we just can not figure out what you mean. Can you please provide an example? Lets say this is the code and below that is the service.

for (var i=0;i);
}
}

group_Item_Add


Database if else query help

Posted: Mon Mar 23, 2015 8:04 pm
by Illya Stepanov

Hi Bill -

Sorry, looks like the code from Egor was corrupted.

try next code:
precode
var found = false;
for (var i=0;i<data&#46;length;i++) {
if (data&#46;groupID == localStorage&#46;getItem("groupid")){
alert ("Your ID was successfully registered Please Share");
found = true;
}
}

if (!found) {
service_name&#46;execute({});
}/code/pre

where 'service_name' is last service you are trying to call, place exact name, cause it case sensitive.


Database if else query help

Posted: Mon Mar 30, 2015 3:22 pm
by Bill7270109

Thank You

That would explain why we were going crazy trying to get it to work. Even though it was time consuming trying to get Egor's code to work.. It was a win win. In trying to figure out what we were doing wrong with the corrupted code we learned a ton. Plus the new code worked perfect in the end,

Thank you all for your support. Considering this is a free and you probably get frustrated with us newbies asking these questions all of the time. you all do a fantastic job.

Bill and Bob


Database if else query help

Posted: Mon Mar 30, 2015 3:33 pm
by Evgene Karachevtsev

Hello Bill and Bob,

Thank you for the update and for the kind words. Please do not hesitate to contact us if you'll need any help.