You could solve problem one in two ways:
Retrieve via the MF use the retrieve by association followed by a "List operation" activity and then choose the operation "Head" this will retrieve the first item in the list which you can then return. You could precede this with a "List operation" action to sort your images and retrieve the "first" one as you mark it first.
Use a list view to show encapsulate the image shown. So you would get Data View (with object) > List view (with the association to images) > Data view (for image object). Make sure to only display one image and do not show a search, make the listview editable to prevent a load more button to show. And make the image data view not editable to prevent editing (unless this is wanted of course).
The second problem can be resolved by:
Adding the metadata object view around the layout grid, and thereby encapsulating the full layout grid in which you add two columns within the left column the image and the right column the object data.
Hope this helps and wish you much fun with the Mendix platform.
Thanks for the reply.
Ad 1. Changed the MF using List Operation Head; the error(s) regarding the MF has disappeared.
Ad 2. What do you mean with 'metadata object view'? I cannot find it in the Modeller.
I can run the app locally, but opening the page throws an error and closing the message box the page appears without the photo left of the data.
The page is constructud as:
Lay out grid (caller of the page)
In first row a data view,
in this data view a second lay out grid; left the photo (over association), in the right column data from the calling entity.
In the second row a tab container (caller of the page) .
The data from the calling entity displays in their corresponding widgets/attributes.
The photo (or any widget related to it) does not show up.
I get this error when association between object and photo is 1:n and 1:1.
Any solutions for this would be highly appreciated.
You can also create a helper assocation 'person_firstimage' and make a dataview to show that image. Is faster and easier in the form.