Status Indicator based on if value is found in another query

You can definitely do a color coded validation for values in cells:


(HT to @Tess here)

But it won't recognize the value you enter until you save it, and won't give an indicator that the value you are typing is right or wrong...

Quick and dirty that I can come up with is accessing the changesetArray for the table and throwing up some sort of big nasty error once you navigate out of the cell:


(maybe you can script something nicer :thinking:)

Code for coloring cells:
{{ (((query1.data).includes(item)) ? "green" : "red") }}

Code for big nasty error :
{{ table1.changesetArray.some(obj => obj.hasOwnProperty('role') && obj.role === 'foo') ? "# Don't put that there!" : "move along" }}
(you can incorporate the .includes() concept from above to reference the "valid_list" and you could incorporate the value of the row from the changesetArray to give more information about what is wrong...)

3 Likes