Is there a way to use If>else>then on an existing column pulled from google sheet?

Hey Folks,

I have a two-fold use case.

  1. Display user-uploaded videos.
  2. Display user-uploaded images and videos on same screen, co-mingled based on timestamp when they were uploaded.

For displaying all videos together, I am making use of Tiles layout. I have assigned a default-image to each video file where Category(another attribute) = Video. I have made use of the If>Then>Else column to assign the default image. My columns look like this.

For my second use case, with a separate default-image column, I am able to display the images and videos separately on the same screen using the Inline Lists but still can’t display the co-mingled look based on timestamp because the media_link column (referring to images) is still separate from the default_image column (referring to image for videos).

I tried using the If:else condition directly on Google sheet. But when I set the condition to the full column, new row entries (data uploads) are starting after the last row with the condition.

I was wondering, if there is a way to apply the If>Else>Then condition in the data editor on an existing column pulled from the Google Sheet? (In my case the media_link column, instead of a having a separate default_image column)

Not completely sure I understand, but it sounds like your default image IFTHEN in Glide should show the default image UNLESS there is another image available — in this case, the IFTHEN should be “if image column is empty, default image, else image column”. This will result in that default image column always having an image in it (either the default image or the uploaded image).

For your Sheet issue, it sounds like you need an Arrayformula.

Thank you! That will work.

For the sheet issue, wouldn’t writing the IF formula and dragging through the sheet be same as writing the arrayformula? I was trying the former.

Yes, until you add new rows through your app — you’ll have to manually copy the formula to the next rows. With an Arrayformula, it does this for you!