Developer Docs - Mobile Docs - Notes
Displays entity notes to the user and supports adding new notes or editing of existing notes.
M v2.0 Integrated Scroll
Overview
In order to get content for our notes block, we need to do a couple of things. In this section, we will walk through the steps necessary to display notes of a specific entity by:
Adding a Note to an Entity
In order to get started, we need to make sure that we actually have a note to display. On your Rock server, navigate to a person's profile page (using the search in the top right is a fast and easy way) and press the add button to add a note. I would recommend adding a note to yourself, as you know that you will have permission to view it.
From here should be pretty self-explanatory. Go ahead and add a note with whatever text you wish, and press Save Note.
Configuration
The setting User Selectable must be enabled within the Note Type to save new notes.
Block Settings
So now, the block knows the entity type that we are fetching notes for, and also the specific note type we are fetching.
Enable Group Notification M v5.0C v15.1
If enabled, the block will utilize the GroupContext of the page (use the SetContext command) as the group to notify when a note is added. Used in tandem with the Group Notification Communication Template.
Group Notification Communication Template M v5.0C v15.1
The communication template to use when a note is added and Enable Group Notification is true. Note will be passed in as a merge field to the communication template that you select.
Show Is Alert Toggle M v5.0C v15.1
If enabled, a toggle will display that allows an individual to mark a Note as alert.
Show Is Private Toggle M v5.0C v15.1
If enabled, a toggle will display that allows an individual to mark a Note as private.
Context Parameter
Next, we need to configure the page settings to look for a PersonGuid as a context parameter. We do this by heading to the page settings, which can be navigated to by pressing the Edit button above the mobile page builder.
Once in the page detail, underneath Advanced Settings, you should see a Context Parameters section. If you do not see this setting, please try refreshing the page and potentially clearing your cache. Set this to PersonGuid so the page knows that we are attempting to pass in a person guid as the context parameter.
Passing Context
We're so close! For some of you, this should be easy peasy by now. But for those still getting started, let's go over quickly how to pass in the GUID as a query string parameter. Start by creating a new page with nothing but a Content block on it. For the content, we will supply a simple button that does two things.
For number one, we will need to obtain the PageGuid of the page containing our Notes block. Luckily, there is a handy feature that lets you do this easily. Press the little blue icon in the top right of your mobile page editor, as seen here:
Once obtained, go back to our blank page with nothing but the content block, and set the content to the following XAML:
{% assign pageGuid = 'your page guid' %}
Simply replace the pageGuid to the one you just copied, and you are good to go.
Launch the application, and tap the button we just created. You should see a similar outcome:
Keep in mind that you must be signed in to add a new note, otherwise the plus is hidden.
Using a Template M v4.0C v14.1
The notes block is typically meant to be used as a full-screen block, with a layout that does not contain a ScrollView. This is due to the usage of a CollectionView, which is a highly performant Xamarin Forms control that allows us to implement things like loading more notes as you continue scrolling down.
In many cases, you may want to incorporate Notes into another layout. That's why we introduced an option for you to customize the Notes block using your own XAML template.
Styling