Page 1 of 1

Database content connected to the link component

Posted: Mon Feb 25, 2013 3:19 pm
by Jahmarley

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.


Database content connected to the link component

Posted: Mon Feb 25, 2013 5:47 pm
by Kateryna Grynko

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.


Database content connected to the link component

Posted: Mon Feb 25, 2013 7:33 pm
by Jahmarley

Hi Katya ,

Ty very much for your response.

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


Database content connected to the link component

Posted: Mon Feb 25, 2013 7:37 pm
by Kateryna Grynko

Glad to hear this :)


Database content connected to the link component

Posted: Thu Sep 05, 2013 12:35 pm
by Jahmarley

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


Database content connected to the link component

Posted: Thu Sep 05, 2013 5:33 pm
by Maryna Brodina

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


Database content connected to the link component

Posted: Thu Sep 05, 2013 7:17 pm
by Jahmarley

Ty Marina.. code worked