I have a table showing customer data. One of the fields is the customer status (e.g. Active / Inactive). Based on this I want to use the "Tag" field type and colour the customer id field appropriately e.g. Active = Green / Inactive = Red.
I've set some JS as you can see in the image, it appears to evaluate to the correct colour based on the customer status however the tag remains grey.
If I colour code the actual status field using the "item" keyword it seems to work correctly (see the second screenshot). Is there any way of making this work on customer id?
Hi @Rob_Faulkner Thanks for reaching out! Unfortunately, this is a bug where currentRow is not in scope for the tag colors
Background color does have currentRow in scope, so your original logic would work in this field. Definitely not a perfect workaround, but wanted to share just in case while we work on a fix for the bug!
Thanks for the pointer, although Im not sure where the "virtualised table" is? I've looked through all the available components / Googled and can't see one?
Thanks @dcartlidge! @Rob_Faulkner virtualized table is a component in Private Beta. I've added it to your account. Please note that is read-only and doesn't yet have much functionality in terms of filtering or server side pagination. If you don't need users to edit table cells, this could potentially be a good option!
Is this still broken? I'm noticing something similar where a Table column set to "Tag", Options list, Mapped... "Color" doesn't seem to have any access to the current lookup record. So there's no "currentRow", "item", etc.
I wrongly assumed I could just add a color column, fill in with colors I wanted, then use the Color spot to get that color from the lookup table.
It looks like this is still in our queue for the legacy table. Since my last message, we've launched our new table component (out of beta and now with read-write capability).
I'd recommend using the new table for this use case.
Hi @Magenta_Jackie My screenshot is for the tag column type. It looks like the plural tags column type has color options when you go to the Add-ons->Option list
Hi there! We just shipped a fix to expose expose `currentRow` in status indicators & it'll be available on Cloud mid next week (and then on prem a couple of weeks after that)
Somehow I am able to access {{item}} in the Mapped options menu, but it's not working. I have a custom HTML column that can utilize the colors I'm passing to it, but I'm still doing something wrong with the tags column. Any ideas?
Is read_member_list also the query that is populating your table?
This data doesn't appear to be formatted as the tags column is expecting. The tags options list is expecting an array of objects where each object has an id, a value, and a color. It seems like your Postgres query is returning an object with and array of ids and an array of nested color arrays.
I believe if you reformat the query data to match the array of single objects structure, you should be able to get the tags colors working.