Which object workspace are you in when you want to display this as a label? If it's the parent object (i.e. Incident) I don't think this is possible ans the label control doesn't facilitate a relationship where the other side is MANY. I doesn't have logic to pick which of several possible records in the other object it should display.
You MIGHT be able to concatenate all of them together via the childfold function, but I doubt you'd get the look and feel you desire.
What you describe reminds me of the flex control that's present OOTB on Incident for the Journal object. Would it meet your needs?
I am not familiar with the flex control in OOTB. If you are, an example would be well appreciated. Below is what I am trying to implement. I would have a list of the emails on one side of the label, and a list of the notes on the other side. This way emails will be separated from the note to reduces overcrowding. When a user clicks on an email or a note, the content will be loaded on the label. I assume this may be possible using web service that is called by a trigger/quick action, such that on click, the trigger/quick action calls the web service which then loads the corresponding text to a field that is used to populate the label. Imagine the following:
Here's the help file reference on the Flew Control... It's also called a Related Objects List. It's the control type that's in both of the screenshots above.
You could put two flex controls on the form, one for notes and one for emails, but I think you are asking for more trouble than it's worth to build out an entire API to make these "collapsible". The idea is interesting to me and you could probably get it to work, but you'd have to build a bunch of button controls to trigger it. I don't see any way to embed an API call into the flex control.
Please note that as of today, the concept I floated above is not implementable. Why? Because for it to be possible, all the following must be implementable:
- Yes a web service can be written to update a field in a business object. the web service can then be called by a quick action, which in turn can also be called by trigger.
- Yes a label can be created which loads text data from the fields updated by the web service invoked by the quick action and the trigger in (1) above.
- But "NO"! As of today, neither a quick action nor a trigger, and by extension a web service can be called by the item click event of the flex settings of a journal. See the image below:
As a result, I have created a feature upgrade request at the link below to allow the calling of triggers/quick actions from the flex settings.
Please visit this request and vote for it.
In the interim, I will look into what Jon has offered above
Just came across your post.
Another option would be if we could nest a grid view with the preview form functionality within a child tab. I'm imagining the list view on one side and the preview form on the other side.