Changes row colour
- Open the model Dashboards and Forms 09, 10: Linked Views and presentation that you created in the previous exercise
- Open the configuration form for the view Book List on the Stream Book List
- In the list of Stream View Attributes double-click on Publisher
- Tick the flag Changes Row Colour
- Press
- Press in the main view configuration form to save your changes
- Open the view and sort by Publisher – simply click on the heading of the Publisher column
- You will now see that the colour of the rows changes when the Publisher changes
Grid column width
- Open the configuration form for the view Book List on the Stream Book List
- Remember you can right-click on any data row and select Show View
- In the list of Stream View Attributes double-click on Publisher
- Set the field Grid Default Width (pixels) to 150
- Press
- Similarly, set the grid width for Synopsis to 400
- Press in the main view configuration form to save your changes
- Either open the view – or if you already have the view open, press Refresh
- You will now see the data displayed with the column widths you have set
Record detail field sizing
- Double-click on any row of data in the view Book List – a form with the details of the record will pop up
- Close this detail view
- Open the configuration form for the view
- In the list of Stream View Attributes double-click on Synopsis
- Set Width On Form (pixels) to 300
- Set Height On Form (pixels) to 200
- Press
- Notice that when you update these values the Size On Form box changes to indicate the size that the field will now have on a form
- Press in the main view configuration form to save your changes
- Double-click on any row of data in the view
- In the record details form you will see the Synopsis field resized to the new settings
Layout of record details form
- Open a record details form: double-click on any row of data in the view Book List
- Press - Modify the form layout
- Grab the corner of the form and expand it
- Grab one of the field names and drag the field to a new position on the form
- Update the name of the details form to Book Details
- Press - Save and lock the form layout
- This will update the layout of the details form for any record – open the details for another record by double-clicking it
- You will see the details form pop up with the new layout
Set field alias
- Open the configuration form for the view Book List on the Stream Book List
- In the list of Stream View Attributes double-click on Subject
- Set the Alias to SubjectOfBook
- Press
- Press in the main view configuration form to save your changes
- Either open the view – or if you already have the view open, press Refresh
- You will see the new view attribute name appear as the column heading in the view
Hover text for descriptions
- Open the configuration form for the view Book List on the Stream Book List
- In the list of Stream View Attributes double-click on Synopsis
- Set the Alias to Description
- Press
- Press in the main view configuration form to save your changes
- Either open the view – or if you already have the view open, press Refresh
- Hover over one of the book descriptions – you will see the text pop up in a hover box
Conditional formatting
- Add an attribute to the Stream Book List:
- Name: gridRowColour
- Type: String
- Length: 50
- Expression:
if (_out.Publisher == "Humbolt", "red", "aqua")
- Re-load the file and run the stream to populate the new attribute:
- Open the file browser from the file collector Book List
- Navigate to the directory …\inputData\Books
- Load the file BookList.xlsx
- Run the stream Book List
- Create a new view on the Stream BookList
- Type: Grid
- Name: Book List – Publisher by Colour
- Attributes: add all attributes to the view
- Press to save your changes
Open the new view – you will see records for the publisher Humbolt highlighted in red, other rows shown in light blue.
Formatting numbers
Open the dashboard Debt Investigation (you created this in exercise 2). You will format the numbers that appear on this dashboard:
- Open the configuration form for the view Overall Debt Levels
- Open the configuration form for the view attribute DebtLevel:
- Set Decimal Places to 2
- Save your changes to the view attribute
- Save your changes to the view
- Refresh the dashboard – you will now see the debt level reported with 2 decimal places
Formatting dates on pivot views
Open the model Dashboards and Forms 01-08: Views, filters and dashboards (you created this in the Introduction to Modelling Course; if this is not available, open Dashboards and Forms 01-08: Views, filters and dashboards R).
- Go to the stream Overall Debt Levels
- Open the configuration form for the pivot view Debt levels by payment method and date
- Make PaymentMeans a Row Attribute, and CalculationDate a Column Attribute
- Double click on CalculationDate in the field Column Attribute to open the view attribute configuration form:
- Set Date/Time Format to yyyy-MMM-dd
- Save your changes to the view attribute
- Save your changes to the view
- Open the view to see the dates as column headings, formatted as you have specified above