cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Where do the options in Dependent Field come from?

SOLVED
Level 1

Where do the options in Dependent Field come from?

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.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Where do the options in Dependent Field come from?

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 8

Re: Where do the options in Dependent Field come from?

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?

Re: Where do the options in Dependent Field come from?

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.

Re: Where do the options in Dependent Field come from?

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.

Re: Where do the options in Dependent Field come from?

Thanks again.  And are you able to comment on the two sub-questions (one explicit, one implicit!) that I sneaked into my original post?

  1. What is the logic behind making all the entity's properties available to be the Dependent Field?  (I'm struggling to see an application for creating a Numeric Range style based upon something other than the widget's value!)
  2. How come the Connections Panel doesn't show the entity field that is being used to style the widget?  I think this should particularly be shown if it's a different field to that used for the widget's value.

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!

Re: Where do the options in Dependent Field come from?

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?

Re: Where do the options in Dependent Field come from?

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.

Re: Where do the options in Dependent Field come from?

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!

Re: Where do the options in Dependent Field come from?

Thanks, I think that would be useful!