App Studio - Binding Dataview caption to field label, is it possible?

Hi Everyone,

I’m currently developing a custom layer for Inspection results entry to replicate what we currently have in the classic configured inspection plans. Early days as there’s a lot of pages to be built then a lot of data rules to be applied.

I’m wondering, to save myself time and to future proof this. I’m wondering, is it possible to show the Dataview Caption in the field label? e.g. in the example below, if I bind a combobox to ResultsEntry.Character001, can I get the combo box label to show “Observation Parts 1”

TIA

Jason.

I don’t think the dataview column captions are exposed anywhere for you to reference them. Could be wrong… but I haven’t seen it.

On top of that the “label” property of a component isn’t a data-binding field (again, at least as far as I’ve experienced).

The only thing I can think of to change the label of a component would be via a property-set event, but again, the “value” you want to change the label to would also need to be stored somewhere.

Here’s a rough example I threw together…

In my TransView dataview, I added a column called ComboLabel.

After TransView is initialized by the application, I row-update a value into that dataview.column:

And finally, I created an onCreate event with my combobox, so when it is painted on the screen… the property-set action changes the label of the combobox to whatever the value of TransView.ComboLabel happens to be:


Preview:
image

So, like I said, this works, but… Not sure the juice is worth the squeeze.

But, if the use case is strong enough, you could preload a generic Label dataview and then property set various controls with the values you want.

3 Likes

Agree with David. LabelText doesn’t have binding capability, AFAIK, so property-set may be the only way.

You might also want to checkout the Dynamic Panels features too like so:

Could conceivably write dynamic panel json in Erp.BO.InspResultsSvc/GetInspParams POST-PROC BPM. :man_shrugging:

Thanks both, I’ve ploughed on and I’m just copy and pasting the control labels for now.