Visibility Of Text Field Not Working

Hello!

I have a text field that I would like hidden if a product is listed on a users product field. Specifically, if a user in their product field has CustomerXM listed as a product, the text field labeled “How long have you been using CustomerXM?” should not appear.

Here is the text field and the settings:

Here is the user database entry:

However, that text field still shows up in preview.

It looks like it is not picking up the value of text in the product field because if I check against a true/false field, the text disappears. What am I doing wrong?

@scook You are checking the field
image which does not contain CustomerXM. So the label is visible.
Either you want to check again the products field or change the Does not contain to Contains.??
image

1 Like

Thank you! Good catch.

Unfortunately, when I changed this to the product field it did not solve the issue.

Here is the screen showing the product field is selected:

For testing purposes, I do want the text field “How long have you been using CustomerXM?” to disappear if CustomerXM is a product a user has.

I am just typing in the value of “CustomerXM” into the field. Do I need to be selecting it from drop down menu in the products section? If so, that section is currently grayed out. How would I fix that?

For reference, here is what the user database looks like again:

@scook Based on the screen shots, our screen lists a product that has a relation to the logged in user.
If you want to display the label only when it is relevant for a certain product it should be:
Will be visible if…
Current Product -> Name
is equal/not equal
Logged In user -> Product -> Name

Note: you always have to refer to a property/field of a related collection (e.g. Product -> Name)

Thank you! What you mentioned makes sense.

When I go to select Logged In User > Products > Name, I get stuck in an infinite loop of menus:

I thought this was being caused because of the relationship I created between Users and Products, but I have tried every combination of potential relationships and it did not change.

Any ideas on what I need to do differently?

@scook Hi Spencer,
I missed the “Many to Many” relationship problem, which is the root cause of this infinite loop.
Adalo can only handle single records. Meaning if you try to select Logged In user -> Products you can not select a single product/record for the filter.

You can do it the following way:
Add the Text label:
image

Then create a list out of it:
image

Relate the list to the Products collection and Filter on Logged in Users > Products.
Add a custom filter to select the product. Optionally restrict the Maximum number of items to 1.

The text label within the list will only be displayed when there is a record which matches the filter criteria.

The screen in the GIF above uses a custom list for products:
image

The custom list includes a Toggle with following settings:


Switching the toggle updates the user and product collections.

Awesome, thank you! That is what I needed.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.