Show Layer within DatField

Hi all,

I am currently building a DataField I would like to "popup" a message when a certain event occurs (e.g. HR > 140).

I was thinking to something like this.

Standard DataField view:

Custom "popup" layer:

Is it doable? If yes, how can I do this? A layer? 
Any code example you can share?

Thank you so much for the support!

  • But in this particular case I prefer your solution even if is bounded to the DF space. 

    Are you sure you don't want to use showToast()? One obvious problem with drawing a message within your data field is that it won't be visible if the user is on a different page. (You can still beep/vibrate to notify them, of course.)

    I realize that showAlert() may not be desirable because the user has to manually opt-in, but showToast() doesn't have the same downside.

    One compromise could be to use showToast() when the data field is not visible, and draw your own "alert" within the data field when it is visible.

  • Unfortunately showToast() only allows text content and I need to draw some graphics not just text.

    your solution, for what I have in mind, is perfect!