Profile Pic using Data (if/then)

Is there currently a way to bring in an if/then column into the User Profile.

I have enabled user profiles.
In the Data Editor I have two columns.
ONE: Default Selfie (a default avatar given to every user)
TWO: Selfie Upload (a place to upload a selfie, if you want to)
Then an if/then column that shows the Default Selfie if the Selfie Upload is empty.

Is there currently a way to make this if/then column THE selfie in the profile?

Right now it only seems to be pulling from the sheet and not the created columns in the Data Editor.

(this seems like something @Robert_Petitto would have some sort of work around.)

(it also seems like a feature request)

Hi Spencer,

What an awesome use case. I guess the only way to do this (Currently) would be to have an if/then formula in the sheet IN ADDITION TO the if then data column.

I say “addition to” only because the if then data column is instant and provides a better UX, and the formula in the sheet, although redundant, will allow for this functionality.

1 Like

I think you are going to run into issues because the user profile image needs to be an editable column. An if/then column probably wouldn’t be recognized because of this, but you also run the risk of breaking an arrayformula if you attempt to do the formula in the sheet. I think a script would be the only way. The script would add the default image url to any row that does not have one set. When a user changes their image, then it updates and the script will not touch it because it’s filled in already.


I think the if else solution would work fine. The default pic column simply has an array formula that fills each new row with a default pic url then the user provided pic fills the next column. Then using an if else column that simply checks if the user pic column is empty. If empty use default column link, else use the user provided link.

Pleaseet me know how it works out!

The solution works fine for the DISPLAY in the app.

But not the actual Profile

And the profile is set to look at the if else column?

It’s not available to be set, I think.

Should be. in the glide editor navigate to profile and select the tab display then the 3 columns appear image, name and email should be able to be set to any column

But at the top, Kevin showed that it’s not available for selection.

@Cmstewart42 User Profiles only looks for spreadsheet columns, not data columns

1 Like

My apologies. Missed the image above!

So would an If > Then formula in sheets work? That should be the way albeit we still want to do it in Glide.


1 Like

So what is the spreadsheet magic that will create an if then for each profile as it is created.
(Without the app thinking it is an extra 9999 rows?)


Assuming you store the default image in column A and the newly uploaded image in column B.

1 Like

something like this:

={"Default Image";arrayformula(if(len(A2:A), A2:A, ""&B2:B))

Where A2:A is the image upload and B2:B is a unique ID to the user profile. Email address or Row ID. Avatar URLs can be any of the ones we found here:

1 Like

You can do that, but if someone chooses to change their image through the user profile, it will break the arrayformula. If I understand correctly, @spencersRus wants the image to show in the user profile with either the default image or a user uploaded image.



Ah…I see the dilemma now. I’ll need to chew on this a bit.

Exactly @Jeff_Hager My original thinking (not knowing too much about the glide code or the spreadsheet magic) was that I thought that it would be good if we could create a data column that would fill in a default image (through Template and/or If/Then).

But I found out that it was not an option. Thus the original question.