Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
is it possible to use State-Based formatting in the mashup to change the view of a datetime object.
For instance I would like to
Display in Red a last checkin value of greater than an hour ago.
Display in Red a last checkin value of less than an hour ago
Solved! Go to Solution.
I think it's totally possible.
You should use a ValueDisplay widget, and bind to it the DATETIME value, but the trick it's that DATETIME value should come from an Infotable result type of a service, that infotable should have just one row for instance (that way you can use the All Data binding and you don't need to trigger a selected row) and at least two columns:
That way, when you will enter on the ValueDisplay ValueFormat on the State-based formatting you will get all the previous Infotable columns in order to do the rule, and you can rule with the Minutes column which it's a Number value.
Best Regards,
Carles.
Hello.
There's not an out of the box method for this. You could try creating a custom .css or state definitions depending on the widget(s) you need to change. You might try something with the epoch time and state definitions.
We may need to know a bit more about where the display changes would be to better answer this.
Thanks,
-- Craig A.
I think it's totally possible.
You should use a ValueDisplay widget, and bind to it the DATETIME value, but the trick it's that DATETIME value should come from an Infotable result type of a service, that infotable should have just one row for instance (that way you can use the All Data binding and you don't need to trigger a selected row) and at least two columns:
That way, when you will enter on the ValueDisplay ValueFormat on the State-based formatting you will get all the previous Infotable columns in order to do the rule, and you can rule with the Minutes column which it's a Number value.
Best Regards,
Carles.
Hi @pablitorun.
If one of the previous responses helped to solve your issue, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon