Add URLs to text[] column like the Image or File Picker components

I am working with a Postgres data source, and I have three columns that are all text data types. These three columns are for Images, Files, and Links (urls). The first two work great when using the Image or File Picker components, but what is the best way to make this also work for URLs or Textual based objects?

Do I have to push them somewhere else first, then combine them and write them back? Do I need to split it out and make a separate relational table? I really like how the Links component displays these from the other columns, but it doesn’t have any actions associated with it.

Anyone have a suggestion or how you have done it before?

1 Like

How do these columns appear in the Data Editor?
Are they arrays (values in pills)?
If yes, you can probably convert your URLs to arrays with something like a Split Text or Make Array column, and then write that.

1 Like

Yes, they are Array columns and they show as pills. The main issue is that there isn’t a way to do this directly except the Image / File Picker. I tried to use a related table and then bring those back in, but you can’t Filter a Link component, and if you do a query on the related table then the value just shows with the Icon and not text / link information.

These are directly in my Postgres table

Query and Lookup to a Related Table

Query

Collection of the link from the Related table, and I can make this open a link on click, but wasn’t what I was hoping for. If you click on the Icon, it does go to the link, but not very helpful.

1 Like

So apart from needing to have a way to add multiple URLs to an array column, you also need it to display a human-friendly title, not the URL itself?

1 Like

Thanks for responding @ThinhDinh, I am not as concerned about the “title” so much as just getting something to show and easily getting them into an array. For the time being I decide to use a collection based on a related table and filter by project number. It works, but I would prefer to keep it all together in the same row like the other two images and files.

I’m a little confused about what you’re actually seeking help/advice with.
Is the challenge about how to populate the URL links into the column?
Assuming yes… then my question would be where are they coming from?

  • Do you have a list of URLs somewhere in some other table?
  • Is a user entering them one by one via a form?
  • Somewhere else..?

Whatever the case, the answer is most likely to first create an array of links, and then write that into the column with a Set Column Values action. The exact mechanics will depend on where the links come from.

1 Like

What Is like, if possible, is functionality exactly like the Image Picker but for URLs..

  1. User can copy/ paste URLs
  2. They are stored in an array column
  3. Preferably without a huge number of data gymnastics to add / remove from that array.
  4. Present the URLs (with it without it being human friendly) using the Link component again just like Image Picker or File Picker does.

Since I wasn’t able to make the described work, I am using another table and storing them as rows and then displaying them as a collection with their click action to open the link. This is functionality equivalent, but not what we hoped it to look and feel like.

Does that help @Darren_Murphy? And, honestly if the answer is, not really gonna happen, that is a possibility we’re prepared for, but also why I asked if anyone maybe knew of an approach like this.
6.

You could have a simple text entry, and specify how users should enter the urls. For example, require them to use commas, or spaces, or new lines for each url. Then create a split text column to split the urls into an array.

I do this with a simple tagging system in one of my apps. I can enter a comma delimited list of tags, which I then convert into an array that I display on a kanban board. I also add a few other variables into the array behind the scenes, but you get the idea.

2 Likes