Visual Functions
Test Your Knowledge
Task: Create a Visual Function
- Create a global data type "Test.Users" with fields "FirstName" (string (32)), "LastName" (string (32)), "Phone" (string (32)), "Email" (string (64)).
- Add three data items to the data type.
- Create a Visual function “Test.UserRendering”.
- Edit the Test.UserRendering function.
- Write a description for the function.
- Set the maximum number of data items to display to 5.
- Select the LastName field to sort data items by.
- Save the function.
- Edit the Test.UserRendering function.
- Remove a table row that renders the FirstName data field.
- Rename “LastName” to “Name”.
- Insert the FirstName field in the same table cell before the LastName field.
- Save the function.
- Edit the Test.UserRendering function.
- Preview the output.
- Change the preview template to some other page layout template.
- Preview the output.
Task: Insert a Visual Function on a Page
- Edit a page.
- Insert the Test.UserRendering function on the page.
- Change the maximum number of items to display to 2.
- Save and preview the page.