Difficulty: novice
Content
Learning Objectives
After reading this article, you will be able to:
Create and delete fields.
Change access rights on fields.
Adjust all settings on fields.
Link information between two objects using fields.
What are fields in Workplace
Fields on a page are database information displaying channels. Adding or deleting a field merely adds or removes the opportunity to view the data stored in these data tables. This is contrary to altering the information within a field, which will change the data stored in Workplace’s data tables in real time.
In Workplace we know object fields and page fields.
In addition, a field can be either a baseline field or a client-specific field.
Object fields
Object fields are fields on an object level, are pre-configured in the baseline and are non-editable (with the exception of client-specific object fields). These fields determine what type of data is possible to display for each and every object.
Some of the fields, like reference and create time are available all objects.
Most fields however, are specifically designed to display data for one a specific object, e.g. number of persons for a reservation.
When a field is not available for an object as a baseline object field, it might be necessary to create a client-specific field. These fields are created on object level. And can then be added to a specific page (thus becoming page fields). To read more about how to create a client-specific field, see the article about /wiki/spaces/KB/pages/93913144.
Page fields
Page fields are object fields that are assigned to and displayed on a specific page.
A lot of the settings available on objectField level are also available on pageField level.
The settings on pageField level override the objectField setting.
The access rights are an exception on this. If a user does not have access to the objectField, the user will never be able to get acces to the pageField.
Create and manage page fields
Reminder: baseline pageFields and objectFields cannot be edited.
Open pageField settings
After a field has been created and added to the page, it is still possible to fully customize all settings on a field. To access the settings of a pageField:
Navigate to the page-definition
Fields tab
Click the Magnifying glass of the specific field.
Add a new page field
In order to add a new field to an instance page:
Make sure you are on the instance page you want to edit.
Navigate to the page definition.
Select the Fields tab .
Press Add field.
On the new page that opens, set the object of which you want to add a field.
Set the field. Choose a field by either searching in the search box, or access all available fields using the three dots. Here you will find all the fields that are available for the object.
Optionally you can set a ‘Display type’.
Usually you can leave this setting empty, in which case the default display type of the objectField is used. You can view this default by pressing the magnifying glass behind ‘Field’.
It is possible to add fields to a baseline page. The options you have for configuring the page layout are however very limited as all baseline fields cannot be configured (for example to change to order).
Delete field from page
To remove a field from a page
Navigate to back-end of the page
Fields tab
Select the field via the checkbox in front of the row
Selection
Delete selected objects
Alternatively you can open the pagefield using the magnifying glass and press the delete button ('x' ) on the top right of the page.
Tip: If you think the page might be used again in the future it advised to just hide the pageField instead of deleting it.
Settings for page fields
Settings for object fields
Objectfields also have settings. As the settings of fields are determined on our baselines, they will not be explained in detail. If you’re interested in the setting, you can navigate to the objectField as follows and hover over the setting to view the help text. To view the settings on an objectField:
on your startBoard press the ‘objects’ button
Search for an object
In the result list press the magnifying glass for quick access to the objectFields
Alternatively open the object by pressing the reference and navigate to the Fields tab
Set access to page fields for all users (on a client specific page i.o.w. with an override)
There is a relative simple way to change the access and hide field for all users.
Navigate to back-end of the page
Fields tab
In the column ‘Access' you can change the field access to ;'View’, ‘Full’, or 'None’.
In the column ‘Visible' you can hide the field when visible is set to ‘No’.
Note: the settings ‘access = none’ and ‘Visible =no’ have the same effect.
Set access rights to page fields per user group (on a baseline page)
Access rights in Workplace can be set on the page field level for specific user groups. This allows Workplace to display the same page, with different content, to different users. To set access rights on a field:
Navigate to the page-definition
Fields tab
press the ‘Field access’ of a pageField at the beginning of the row.
To select which access a user group should have to a field, select one of the options from the drop down menu next to the specific user group.
“None” means that the field will not be visible to users with the specific user group.
“View” means that the field is view-only to users with the specific user group.
“Full” means that the field is editable to users with the specific user group
Remember: a user only needs one user group that has access to a field. So if you want to use this way to hide a fields for user (or make it read-only), you need to make sure that this specific access is applied to all user groups that the user has.
We recommend very limited use of authorizing fields using this method.
Set access rights to object fields per user group (same for baseline and non-baseline pages)
The access on object field can be set in the same way as for page fields.
Navigate to the page-definition
Fields tab
press the magnifying glass in the row ‘field’to open the object field setting
To select which access a user group should have to a field, select one of the options from the drop down menu next to the specific user group.
“None” means that the field will not be visible to users with the specific user group.
“View” means that the field is view-only to users with the specific user group.
“Full” means that the field is editable to users with the specific user group
Be careful setting access on this level. When changing access on this authorization level, you change the access on all pages that use this field. If you for example set the access to ‘None’ for the field request.reference is will be hidden on all pages that this field is used on.
Show information from other objects on your page
It is possible to link two objects via the {object}Id field with the goal of displaying information from a different object. Workplace always looks up when determining what information should displayed. This is easiest explained using an example.
In this example the phone number and email address from the requestor, should be displayed on the Request page . To achieve this:
Add the request.requestorContactId to the page. Note: that the field name ends with contactId (meaning a contact is set in this field);
Directly below this field, add the ‘contact.phone’ field from the Contact object;
Below that the email is added;
Workplace now automatically makes the link between the two field we added of the Contact object and the contactId field that is displayed above these two fields.
By using the fromContactId field, directly followed by the two Contact fields, Workplace knows to show the phone number and email address belonging to the requestor.
Explicitly link fields
As explained above, Workplace looks up to determine what information to show of other objects. However, sometimes you might want to display information from a field.
If your fields look as they do in the screenshot below, the phone number of the Property Manager (property.managerContactId) wil be shown on the page.
If you want to display the phone number of the Owner instead there are two option:
You could switch the order of the Owner and property manager fields;
If you do not want to switch the order of the fields, follow the steps describe in steps below.
Steps to explicitly link fields:
Open the settings of the property.phone field by pressing magnifying glass at the beginning of the row in the list with page fields;
Set the ownerContactId in the ‘Linked to’ field
Now select ‘id’ in the ‘Linked to field’.