Its Possible to use Dataview in Layout?

0
Can I use Data View in a Sidebar Layout in Mendix? I'm encountering an issue and could use some assistance. I've attempted to implement Data View using a snippet, but I'm receiving error code CE1154. Error Message:   Could someone please help me resolve this issue with using Data View in a Sidebar Layout in Mendix?
asked
2 answers
1

Hello Wahyu,

 

The problem is that at the moment your snippet is expecting a parameter, but that is not possible with an layout, you need to remove this and make sure that the dataview within your snippet is self-sufficient so you need to retrieve your object with a microflow or nanoflow.

 

Step 1: 

image.png

 

Step 2:

 

image.png

 

Hope this helps,

 

Good luck!

answered
2

Hi,

yes you can use a snippet and have a dataview in the snippet. However, the dataview cannot have a parameter (as stated in the error), but you can use a datasource microflow instead.

As an example: Display the user name of the person logged in, in the top bar

 

Layout

image.png

Snippet with dataview

image.png

Datasource microflow

image.png

 

Outcome (just an example with an anonymous user in an app.

image.png

 

By the way, I took a shortcut creating the example. If you want to use customized layouts, it might be best to create a copy of the Atlas related layout and store it in a custom module, since updating market place modules is not best practice.

answered