This message was deleted.
# questions
b
This message was deleted.
w
You can conditionally import data from Airtable to stacker using Data filters- can you explain your use case?
r
use case is in Airtable a cell is colored red because value is less than zero. I want either the cell data data in Stacker to appear red, or the entire row to appear red based on this condition
but I don't want to manually import data. I'm hoping this would happen automatically, similar to how Stacker now displays a colored picklist value in Stacker the same way it is colored in Airtable.
and thank you @wonderful-pharmacist-31651 for your help.
w
@rich-france-14624 Here is a potential workaround - 1. Create a formula field in Airtable called “Number Card BG Color” with the formula
IF({Airtable Number} < 0, "f43434", "ffffff")
where {Airtable Number} is the field that holds the number - In this case, the Background Color will be f43434 (red) if number is less than 0, or ffffff (white) if it is greater than 0. 2. Create a field in Stacker called “Number Card Image” with
"<https://dummyimage.com/300x100/>" & {Number Card BG Color} & "/ffffff.png&text=" & {Airtable Number}
3. Show the “Number Card Image” field where you want to display it and check “Display URL as Image” Note that the image size can be altered by changing the 300x100 Let me know if you need assistance along the way if you use this
👏 2
⭐ 1
r
Thanks - I will try this.
g
The custom image works, although it doesn't color your whole row. You can do something more fun with the "color" by adding shapes to the image to make it more intuitive (see attached image). In my scenario I am using a linked record in Airtable + a lookup field to choose which image should be displayed. That way your images can be stored and updated directly in your dataset. You should also note that single-select Airtable fields can now display their color in Stacker (see second attachment). Again, it doesn't color the whole row but is pretty easy to work with. If you need something more advanced you may also be able to use custom JavaScript to change the row color based on values after the page has loaded. I have very limited experience with things of this nature so I can't say exactly how to do it. I can say that it is possible to extract data from the HTML with some JavaScript and add styling overrides, after the page has loaded. One big challenge with this is that switching between pages within the same app will reset your style overrides and you need to run your JavaScript again. The only way I got this to work in my app is to have the script run every n seconds on the entire app. It results in a slight lag after loading the page but does work.
w
@green-branch-21252 It will color your whole row if you use wider size parameters and the “Rows” Display type (example Attached with left alignment on the dummy) This was meant to be a simple solution that most people could do with copying and pasting. I will provide a much more in-depth guide in a few weeks that explains how to make it look less “bleh”
r
@green-branch-21252 this technique is perfect! Different need for me, but I love this.