Skip to main content
1-Visitor
June 22, 2016
Solved

Where do the options in Dependent Field come from?

  • June 22, 2016
  • 8 replies
  • 3376 views

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.

Best answer by Aanjan

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?

8 replies

5-Regular Member
June 23, 2016

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?

rwiseman1-VisitorAuthor
1-Visitor
June 24, 2016

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.

5-Regular Member
June 24, 2016

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.