UserProfile.Email not found in email column of sheet

First time reporting a bug? Refer to our Start Here post.

Describe the bug:

  • Describe the bug in simple terms

We have the datasource as Google Sheet. Using the “Visibility” condition feature for a specific component, the criteria is to search with “is included in” the email column on the linked data source, which does not work. Interestingly enough, when using a different column such as, to search in Name column, this does work. Ive confirmed there are no trailing spaces, or any characters that appear in one sheet and not the other in th email column. Now Im thinking this has to do with the fact the Goodle sheet is an exact replica of a Master sheet (ie, IMPORTRANGE builds the sheet Glide uses), but I’m wondering why email column doesnt work, but something like “Name” column does

Expected behavior:

  • What should happen?

Email should found in the column the Visibility condition referneces and the components I have in the screen should “hide/show” if email is “found/not found” within the email column

How to replicate:

  • List the steps, in detail, for recreating the issue
  1. Create a Google sheet with 2 columns, data & email
  2. Create another Google sheet be used by glide, which references the one created in step 1
  3. Create a page that is based from the google sheet in step 2, and create a component with the Visiblity Condition as describe above

Visibility looks for a matching value in the specific row your screen is attached to. Based on your description, it seems that you are attempting to search for an email in all rows, which isn’t how it works. Are you sure your screen is attached to the correct row? Do you have any screenshots to share? I’m thinking you need a joined list of emails to check if your user email is included in that joined list, but I’d need to see more to say for sure.

Ah, maybe I dont fully understand how “visibility” performs its searching functionality. I have a user_reg sheet. Column 1 is name and column 2 is email. There are maybe 100 rows in the sheet. The screen is linked to user_reg, I can see the correct colum names as values within the search condition, and I have a components within the screen that are supposed to show, or hide, based on the user profile email (the table that Glide uses by default to perform checks such as “is users are signed in”). My thought was that if I select the “Email” column in the visibility condition (so the condition basically reads; “Shows when user profile email is included in user_reg Email”) , then it will search every row of that column.

If I’m understanding corrrectly, I think you just need to create a Joined List column that merges all of the emails in the user_reg table into a single comma delimited string. Then you should be able to set a visibility condition that checks if the user profile email is included in that joined list.

Thanks! That works perfrectly. Im surprised that this did though. I see the joined list column actually creates a joined list on every single record in the google sheet. Which is fine as long as it works, just wondering how. Coming from SQL, in my mind the visibility condition would be similar to a SQL query that reads, “check if this value exists in this column”. So just curious how Glide handles its. Thanks so much for your solution and fast reponse!

Like I said, Visibility only looks at values in the current row that the screen is attached to. The point is to control visibility of components based on values in that current row that you are viewing. In your case you want to check against values for all rows in the column. The joined list merges all values from multiple rows into one column cell. With the joined list of all column values in one row (which is the row attached to the screen) you can compare against all of those values. It’s still only looking at one row, but all of your values are on that one row.

Many people tend to mix up Visibility and Filtering. Visibility controls the visibility of a component. Filter controls the content within a component such as a collection. Comparing to SQL, a Where clause would be similar to setting a Filter in Glide to filter which rows in a table you want. Whereas, Visibility is like hiding or showing an entire datatable that is fed from the SQL query.

1 Like

So when you say “current row that the screen is attached to” are you referring to the 1st row in the attached sheet? For example, my registration page is linked to the user_reg sheet.

That page is only going to be attached to one row. Which one depends on a lot of things. For example, Row Owners could restrict which rows are accessible, so the screen would be attached to a row owned by the signed in you. You could have navigated to that screen from a collection, which would mean that the screen is attached to the row you selected in the collection. Maybe you have filtering on the screen itself to filter to a certain row. Maybe you are sorting the data in a way that is not sheet order. It all depends on how you got to that screen, if you have row owners, and how the screen is filtered and/or sorted.

By default, it’s mostly likely the first row in the table, but not always.

If you click on the Data Preview in the lower left corner of the screen, it will show you which row or rows the screen or a collection component is connected to.



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