In the fifth installment of this series, I look at views. How to design them and where they are used.
Episode 5: Views
Transcript
Starting on the entity, go to Views
This lists all the system views that are associated with our entity. These are generated when you create an entity. Some of them are normal, views that represent data to the user when they view lists. Some have special uses, which I will go through at the end
Lets start with a new view
Give your view a name, meaningful for what it will be doing, hit create
As you can see, it now displays the defualt field of your entity, name. It is also showing you data from your live system, so you can tell if you need to adjust layout to fit your data
Some fields, the ones that are added by the system, are hidden, so change the selection to All. Then, it is as simple as drag and drop to add a field to the view.
You can use the drop down on each field to change the width, or drag the handles. You can also drag and drop to change the order. Delete the column by the drop down.
On the right or on the field, you can define the sorting. This changes the sorting by first ascending then descending if you repeat the action. The sorting is only by fields visible in the view. You can add further sort criteria as well.
Filtering of the view is fundamental. Select Edit Filters. I want to show only my approvals, then add row. This is a simple field chosen on the entity at the moment. Select the field, then the condition. There are some special ones when working with user records to define it as the current user
Hit Ok. Notice that the displayed list is filtered straight away, helping you to quickly visualise what it will look like. Back in filters, we can do lots of more advanced filtering, such as filtering on a parent or child entity. We can also group conditions to allow for complicated expressions using Or and And parts.
Once we are happy, hit save, then publish so we can check it out in our app
When we got to My Things now, in the view drop down, there is a new selection
I can chose this and get my filtered list. The end user can add additional filtering as needed or resize columns, but the fundamental filter is kept.
Back to our maker experience, to add a field from a parent entity, by selecting related. Here I add the primary email of the approver to the view, which allows me to see parent information on the child record. Just that, no child information or many to many information is available.
Just to show you the lookup view, I connected account to My thing via a relationship. On the account form, the list of fields displayed when selecting my thing is defined as the lookup view.
Quick view and advanced find are the views used for those particularly capabilities in the app. Feel free, and you should, update these to your business needs.
Users can also make their own views (subject to permission), by selecting Create View in any view. Their interface is not as pretty as the maker experience, but would assume this is coming.
They can base the view on an existing view. Then ammend a filter. Hit save, give it a name and close.
This new view is available under the drop down under My Views.
If you go back to Create Views, under saved views, select the view you just created and you can hit Share, which allows you to share the view with a colleague or team of colleagues. You can also allow them to edit this view.