Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
When adding State Formatting to a widget (I'm using a Gauge) you have to specify the "Dependent Field" to use. I would have expected this to be (or at least default to) the value that the widget is displaying (i.e. the property bound to the widget's Data field) but it doesn't. It seems to show a list of all the properties of the entity from which the widget gets its value. This seems slightly unintuitive to me. Does anyone know the logic behind this? Am I correct in my assumption of where the list comes from? If you haven't bound the widget's data, you can't add State Formatting, so that seems to corroborate my assumption. I think the other reason I'm confused is that once I've chosen a Dependent Field, I would expect that to be shown in the Connections panel - especially if it's not the same as the widget's Data field - but it's not.
Solved! Go to Solution.
Well, the logic behind populating the dependent fields is get all properties; hence that's why all properties show up. This might make sense from a custom widget standpoint; as you can create and use a custom widget, the availability of all properties would not hinder its functionality in any way. For the second question, did you mean displaying the chosen dependent field once you select that in the styles menu?
Richard, you are right, those are all the properties the widget has. The 'Depended Field' in the State-based Formatting section outputs all properties regardless of the widget (you may find description/ name in that section for a Gauge widget). By Connections panel, can you give me more information on what you are referring to?
Thanks for the response. It sounds like you're saying the properties are the widget's properties, not the properties of the entity that the widget's data is bound to -- is that correct? If so, how come the widget contains all the properties of the entity from which it gets its data?
When I say "Connections Panel" I mean the middle section at the bottom of the mashup builder where it shows data and event bindings.
Sorry, I meant the widget displays all the properties that is part of the Thing regardless of the widget functionality. That's why I had pointed out the description property of a Thing can be selected in a Gauge widget, even though you wouldn't use it there.
Thanks again. And are you able to comment on the two sub-questions (one explicit, one implicit!) that I sneaked into my original post?
It's just for my understanding really: if I can't see the reason for something, it makes me wonder what else I won't understand!
Well, the logic behind populating the dependent fields is get all properties; hence that's why all properties show up. This might make sense from a custom widget standpoint; as you can create and use a custom widget, the availability of all properties would not hinder its functionality in any way. For the second question, did you mean displaying the chosen dependent field once you select that in the styles menu?
Thanks.
And yes, since the connections panel shows (as I understand it) how entities are linked (i.e. what events trigger what actions and what properties are bound together), it would make sense for the dependent field to appear in the connections panel.
We could possibly have another tab, next to the To-Do tab, for dependent fields. I can possibly check with few devs here if that would make sense as an improvement or a new feature request. Thanks!
Thanks, I think that would be useful!