Preselect item of a List View that is listened to

3
Hi all, I want to create a Object Detail page (like the Master Detail user and info template) with a list view left of it. With that list view, it should be possible to see the details of another object. However, I also want this page to be reached from double clicking a row in a data grid and thereby passing an object. Is there any way to do this? I have tried many different possibilities (e.g. adding a 'selected' boolean, having a non-persistent entity as the caller of the page), but non of it is satisfying.
asked
3 answers
7

This has bugged me for a while, so I decided to create a custom widget. Here's a link to the GitHub repository.

Direct link to widget MPK.

This widget works in my test project for Data Grids, List Views, and Template Grids. Here's how to use it:

  • Pass the selected object to your page
  • Put your list widget (Data Grid, List View, Template Grid) inside that. Add this SelectionHelper widget directly below your list widget. It will look at the context entity, and try to select the same entity from the list.
  • That's it! Your object should automatically be selected when opening the page.

Please give it a try and let me know if it works for you!

Edit 1: I updated the widget so you can also use a microflow to get the object to select.

answered
1

A potential workaround that I've used once or twice (and may or may not be what you want) is the following:

  1. Pass the selected object that is double-clicked in the grid as caller of your listview page.
  2. Sort your listview using a microflow, where you set the 'caller of the page' object as the first item in the list.
  3. 'Listen to widget' should automatically listen to your first list item
answered
0

I would create two screens and use a snippet for the parts that are equal in design. Or am I missing the point of the problem?

Regards,

Ronald

[EDIT] The dashboard with the graphs is a seperate form. In the listview create a microflow action when the object is clicked. In this microflow open the page with the detail view. In the detail view have the same listview as on the dashboard page so you can use a snippet for that.

[EDIT2] It does not necessarily need to be the same listview. You can do whatever is logical for the end user. If the dashboard contains a lot of columns you could use only a identifying column in the detail page. You only need these objects so you can open another detail page or just close the screen to go back to the dashboard page.

answered