Jahmarley
Posts: 0
Joined: Mon Apr 16, 2012 8:21 pm

Database content connected to the link component

Good Day Tiggzi,

I am using parse database to store information which is displayed in my app (I would prefer using Tiggzi's but I cannot display images from tiggzi database without user authentication).

My database has categories populated with information for businesses. These categories include telephone number fields and mobile site address field which are connected to link components in the app builder in order for them to have click functionality.

Some businesses may provide 3 telephone numbers, some may provide 1 or 2 and some may or may not have a mobile site.

The problem I face is the displaying of the results for the businesses that do not have information stored in all the fields connected to the link component.

When I was using the old app builder, the URL field for the link component in the app builder was not mandatory and when results were returned, if the field connected to the link component was empty, the link component simply would not show.

With the new builder, It is now mandatory to have an address in the URL field (http://tiggzi.com is stored by default). When results are returned, the link component still displays, even if the field connected to the link component in the database is empty.

How can I get the link component to show only if the field connected to it from the database has information?

Thank you.

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

Database content connected to the link component

Hi,

To make the link invisible you should map phone to "Visible" property, click "Add JS" and paste the following code:codereturn (value != "").toString();/code
If phone value is empty component will be invisible.

Jahmarley
Posts: 0
Joined: Mon Apr 16, 2012 8:21 pm

Database content connected to the link component

Hi Katya ,

Ty very much for your response.

I have followed your instructions and pleased to confirm this issue is resolved

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

Database content connected to the link component

Glad to hear this :)

Jahmarley
Posts: 0
Joined: Mon Apr 16, 2012 8:21 pm

Database content connected to the link component

Hi Appery team...

It appears as though a recent update may have created a change in the way the code

return (value != "").toString(); works.

I have made no changes to the app... However, instead of making the link invisible the link now shows as undefined as per the following image:

Image

Thnx for the help

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

Database content connected to the link component

Hello! In JS mapping replace codereturn (value != "").toString();/code with the following code codereturn (value != "" && value!==undefined).toString();/code

Jahmarley
Posts: 0
Joined: Mon Apr 16, 2012 8:21 pm

Database content connected to the link component

Ty Marina.. code worked

Return to “Issues”