Rafael Marques
Posts: 0
Joined: Thu Aug 14, 2014 12:00 am

code not works if there is an "if" .

no code works if there is an "if" .

nothing , do not ask me to explain the problem , I want you to come into my builder and find the error .
The months I am trying to build my fashion app that I want , but I can not because no code works if there is "if" in it .
When you take the "if " everything works .

Ja asked me to send to support @ apperyio but no use .
Nobody solves my problem .

Please , for God's sake , find out what 's wrong with my builder .

After you have updated it , the "if" code stopped working .

I can pass the login, password, public link, and you can come and try to put some code with "if" and you'll see that it works .

Please solve my problem

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

code not works if there is an "if" .

Hello!

If condition works for sure, it is pure JS. Most likely there are some other problems, for example not declared variable, or this condition is never true.

Please debug your app. Are there any errors? Is code execution reaches this condition?

Rafael Marques
Posts: 0
Joined: Thu Aug 14, 2014 12:00 am

code not works if there is an "if" .

Marina, it worked fine.
When you have updated the Builder stopped working.

I didn't change anything!!
Updating the old constructor for this new constructor did the code stops working.

Rafael Marques
Posts: 0
Joined: Thu Aug 14, 2014 12:00 am

code not works if there is an "if" .

I think I know what is the error.
Help Me please.

This is my public link:{

http://appery.io/app/mobile-frame?src...

}

Click the button on the home screen

Image

You have 2 cities to choose from:

Itamaraju or teixeira de freitas.

When you click Itamaraju, you receive from the database all companies of Itamaraju.

When you click Teixeira de freitas you receive from the database all companies of Teixeira de Freitas

Image

Click Itamaraju, and you'll enter the page Itamaraju.
Then click on "building materials"

That will show you the companies of Itamaraju which are home-building sector.

Image

Image

This is the list.
You can click on any item in the list.
When you click you will be taken to the page "Empresa".

The "Empresa" page is a single page of the app server to show any company selected in the list.
Can be of Itamaraju or of Teixeira de Freitas.
Can be any one of the two cities.
Are always shown on the page "Empresa"

Image

Image

The page "Empresa" shows all enterprise data, Phone, address, photos, location, email ...

Now you already know how the app works.

Depurei the application and see the following problem.
Please help me to solve.

Image

The error that pops up is related to the city of Teixeira de freitas.

And this company is shown in image ...
is a company town Itamaraju.

I believe you have something to do with it.

The page Empresa has Read mapping service of 2 cities.
Itamaraju, and teixeira de freitas.

If I open a company on the list of city of teixeira de freitas, the error that appears is of Itamaraju.

If I start a business in the city list of Itamaraju, the error that appears is of Teixeira de Freitas.

This is because the company has the page "read service" of 2 cities.

Image

But I don't believe that this error is the problem for the "IF" of the JS code is not fucionando.

I did the test by creating another app.
And even creating another app, code that contains "if" do not work.

You can debug my app, and figure out the problem?
The only mistake I found was this.

How can I solve this problem and make the "if" back up and running?

Rafael Marques
Posts: 0
Joined: Thu Aug 14, 2014 12:00 am

code not works if there is an "if" .

Image

The error says that the object with that id is not found in the collection Teixeira de freitas.

That's because that object is the city Itamaraju.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

code not works if there is an "if" .

Hello!

Please post a screenshot from DB where in collection is specified object.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

code not works if there is an "if" .

Hi Rafael,

I know what is wrong..

You have confused collection names.

In request i can see collection "teixeira_impresas". http://prntscr.com/54rxbs/direct

In DB you show us "itamaraju_impresas". http://prntscr.com/54rxot/direct

Regards.

Rafael Marques
Posts: 0
Joined: Thu Aug 14, 2014 12:00 am

code not works if there is an "if" .

Not yuri, you misunderstand me.
The "business" I have read-service from the collection "Itamaraju_empresas" and "Teixeira_empresas".

When I open any item to the companies, if the id is an item of the collection "Itamaraju_empresas" pops up that error saying that the id does not exist in the collection of "teixeira_empresas".

If the item is the collection "Teixeira_empresas" pops up that error saying that the id does not exist in the collection "Itamaraju_empresas".

Because the company has the page 2 read.
If the item abcd has in the collection, also page Itamaraju searches the collection teixeira and discovers that there is no la.
If the item is in the collection fgtremj teixeira, the page also searches the collection Itamaraju and discovers that doesn't exist there.

And shows the error.

Return to “Issues”