In the details box, How might I code something so that if the date equals {today} that the text would change size? thank you
Where exactly are you trying to implement this? Depending on what widget you're working with, this may be doable, but the means of accomplishing it may differ. In an Indicator, for example, this is pretty easy.
in this details box. as you can see they are currently ordered by date with newest on top. I'd like to make the next bigger if the date = today's date so as to draw attention to it.
Should be simple enough in a list, too. You just need a quick expression to evaluate the date field against today's date, then push a value into a returned attribute.
var the_date = $datapoint["sale_date"]
var text_size = "10px"
if(the_date >= today()){
text_size = "16px"
}
return {
attributes: {
text_size: text_size
}
}
Once you have this, the next step is to edit your list viewing the HTML source, then using that returned attribute to define a span of text.
<p>{document_number}</p>
<p style="font-size:{expression/text_size}">{sale_date}</p>
My sample data doesn't have any current data, so I've set mine to an arbitrary date so you can see it working.