Iterating Through Panels (Sheets) To Find Specifically Named Control

Couldn’t you just (easier) set the Property of the EpiDataView to ReadOnly? Then you don’t have to worry about what control it is?

Nice deep dive though, in all seriousness :slight_smile:

2 Likes

Jose:

Just to help me with a foundation… is the advantage there that it would completely remove processing on the “RequestMove” field within the data view (and I’m guessing make the control object for that field inaccessible on the form due to underlying business logic), as compared to the approach of removing the control altogether?

@Aaron_Moreng

Sure… kick a guy when he’s down. :woozy_face:
Interestingly enough, you’ve selected a fine depiction of how I went about this whole thing (imagine being stuck in the same office with me).

1 Like

Right you wouldn’t ahve to go looking for the controls rather control the data it is bound to and set the rule there.

@josecgomez:

I have been assigned a similar requirement for a checkbox control on the Order Entry form, as well. So, I’ll approach this new task by manipulating the data view and get a feel for how that works in comparison. It certainly seems a lot simpler than waving a magic wand over the form controls.

Thanks for that suggestion, José. Much appreciated.

@josecgomez.sixs, @BA-Quest

How does using the EpiDataView property method translate to the users experience?

Does setting the EpiDataView to R/O affect the appearance of the control on the form?

If the control appears unchanged (still changeable), what happens when a user changes it then tries to save? Any kind of warning or exception? Or does the update of the record proceed, but with that one field unchanged?

EpiDataViews are EpiBound to the fields. Setting properties, like readonly affects the bound controls as well

1 Like

The control should not be changeable of the data view is read-only

-Jose

1 Like

Thanks for the deep dive, I found it quite refreshing to see the process documented for a change!

@josecgomez is right that setting a data property is easier, more efficient and more maintainable, and I think you’ll fine the relevant controls “grey out” so users won’t be confused. But it’s nice to know all the alternatives, and there are definitely times when there’s good reason not to let users know some options or controls even exist …

1 Like