Why cant i add an array that is made up of two columns into my app?

i have two coulmns, ‘sale’ (MSRP price) and ‘sale_price’ (my price) and i tired to merge them into a single column using array. but for some reason i cant find the array column. when i try to select in the dropdown menu. I added photo to clarify, also it possible to edit the text color as shown in the image below.


Screen Shot 2022-08-14 at 4.42.43 AM

Instead of an array, you’re probably better off using a Template column for this purpose, and display it in a Rich Text component. Doing that, you could also apply some inline styling to change the text colour.

The Action Text component that you are using expects a single value, which is why you can’t target it at your array column.

1 Like

Great, I did merge them together successfully using the template. but still have not figured out how to change the text format. Do I have to use CSS to do that?

Just a bit of inline styling would do it, yes. Something like:

<p style="color:red">{price}</p>

And then replace {price} with your Price column value

Actually, just looking at your screen shot, maybe something like this:

{sale-price} was <span style="color:red;text-decoration:line-through;font-style:italic;">{price}</span>

which would give you the following:
Screen Shot 2022-08-14 at 6.23.36 PM

1 Like

ok i was working on a code for the strikethrough

{price}

but then I came back to your thread and you already had one for me lol.
But where do I put this CSS code. do I have to create a new column?

Put all of that in your template column, using replacements for {price} and {sale-price}, then use the template column in a Rich Text component.

2 Likes

I just got it lol. Intersting! I was using the action text and it wasnt working properly, I switched to the rich text format and voila!
Thank you boss!

1 Like

yep, you can do a lot with the Rich Text component and a bit of CSS.
Just be aware that Glide do not officially support this - although that doesn’t stop many of us from doing it :wink:

2 Likes

that opens many door for me lol :slight_smile:

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