I’m trying to format text outputs from a callback differently depending on the content (the callback outputs conditional text). I can’t figure out how to access the text as a variable to use in another function that could update the color, and I can’t update its html style in the original callback function (to my knowledge). So far I’ve tried:
- a new function not in a call back (but I can’t figure out how to access the text content from the callback)
- another callback function (but I can’t figure out how to input the callback output into the style).
Basically what I’m curious about is whether (/how) you can access callback outputs like variables
ex: I want the error_text to be red IF it contains certain words. How can I reference this in the style? Alternatively, how can I edit the callback so that the output string is already formatted correctly?
content = PARSING ROWS FOR DATA (irrelevant code)
if content != 100:
output = ‘output1’
elif content == 100:
output = ‘output2’