Servicely Configuration
Custom Related Lists
5 min
within a form, there is often a requirement to show a list of records that does not have a direct relationship with another record type and this is where custom related lists come in this allows you to provide a list of records on a form, whilst using the context of the record you are looking at an example of this is looking at the last 3 months of incidents requested for a user, on the user record usage it should be noted that we typically suggest limiting the amount of records you are including here as a result, if it is something that can potentially grow over time, it typically makes sense to restrict it to the last 3 months or otherwise to ensure it can be scalable over time custom related lists are essentially used to add a related list to any table, based on a query looking at the current record or not as a result, this is focused on form layouts that you can add to the form slightly differently to any other form such as the below image on the user record as a tab it appears to look like any other related list the main difference is that you cannot create new records or add/remove records from this related list this is because it is not directly tied to a relationship, so making a new record from this list would mean it would not know how the two records should be tied creation creating a custom related list is a purely administrator activity although other users will be able to see the lists, it will still take into account a user’s visibility / permissions, so will not expose data to the user that they should not be able to see to create a custom related list go to the menu item administration > page configuration > custom related list when you are on this screen, you will have to enter the following fields in this example, we will use the example of showing a list of incidents on a user record, for the user you are looking at for, created in the past 3 months, where they are the requestor/requested for field description example name this is the name of the custom related list, which is largely used for understanding what list is used for what incidents related to user created last 3 months description this is purely used for informational purposes this shows the past 3 months of created records for a user record you are looking at where they were the requestor/requested for accessible on this is the list of tables where you will be able to use this custom related list such as, these are any tables where you can have it come up user table this is the list of records that will be showing up in the related list incident query this is a scripted field that defines what records will be showing up in the list noting in this case “current” will be the record you are looking at so in the record, the current user record’s id once this has been completed you need to proceed to the place where you want it to show (the accessible on) and configure the form as you would any other form once there, you can click and drag custom related list under layout elements, as you would any other field then, you need to hover over the element and click on the gear and then you will encounter a popup where you have to select the custom related list you want to use and the process is completed with the advanced renderer properties, you can also define the columnlist, sortorder and also add a new button