Step 1. Add placeholders for new content.
- From the Theme 2 - App Builder palette, drag into the Tile Container in the repository:
- Tile Blank and enter the name Comment
- Tile Map and enter the name Map.
- PhixFlow displays the two new tiles in the dashboard. The map tile shows a request rejected message.
Step 2. Set up the Comments area.
- In the repository, right-click the Analysis Model ETL and click Display.
- In the model window, add a new stream. In the stream properties tab, set Basic Settings:
- Name: Comments
- Period: Transactional
- Audit Manual Changes: tick
- Save your changes.
- In the Attributes section, click Add to open a new attribute properties tab. Set:
- Name: Comment
- Type: Bigstring
- Save your changes.
- In the Attributes section, click Add to open another new attribute properties tab. Set:
- Name: BusinessUID
- Type: Integer
- Save your changes.
The Attributes section should now list the attributes you created, Commend and BusinessUID, plus those added automatically when you ticked Audit Manual Changes (UID and the "Update" attributes).
- Remember to save the analysis model as well as the changes to properties.
- To reopen your dashboard, click on the Business Data menu option on the top right of the PhixFlow window. (Added in Part 1 step 4.2).
- Right-click the dashboard and select Unlock the Layout.
- From the palette, Shift+drag CommentsComplete into the top comments area.
- Click into the body of the comments section (which is a card) to open its card component properties.
- Drag the properties to the same tab column as the palette, so it stays visible.
- In the model window, bring the model to the front and click the Comments stream to open its properties.
- Drag the stream icon from the properties tab onto the stream name in the card component tab and save the changes.
- Minimise the model window so that the workspace shows the dashboard again.
- In the dashboard, from the Business Data grid, drag the UID header onto the body of the comments. This sets the background filter for the card.
- In the filter properties tab, change the Filter Details to use the BusinessUID instead of UID and save your changes.
Step 3. Add an editor where users can enter and format comment text.
- In the repository, right-click Dashboard and click Add.
- In the new dashboard properties tab, set
- Name: CommentEditor
- Allow User to Resize: untick
- Show Window Button Bar: untick
- Always On Top: tick
- Save the changes.
- PhixFlow opens the new empty dashboard, which will be the Comments editor.
- From the palette, drag Form Popout - Complete into the new dashboard and enter its name; CommentsEditor
- Switch to the model and click the Comments stream to open its properties. Pin the tab.
- To reopen the dashboard, in the repository → Dashboards , right-click CommentEditor and select Display.
- In the Comments dashboard, right-click and select Unlock the Layout.
- From the pinned Comments tab → Attributes section, drag the Comment attribute into the Comments dashboard.
Step 4. Set the comments editor header
- In the Comments dashboard header, click Static Text and enter
Comment for
. - Click the Dynamic Text to open its properties tab and set Name to BusinessName. This will connect to a context parameter that will be created in Step 5.4.
Step 5. Set up the Comment Editor Add button
This process also links the Comments area to the Comments Editor dashboard.
- Ensure the Business Data Manager dashboard is visible and unlocked.
- In the repository → Dashboards, drag CommentEditor onto the + button, which is in the top right of the comments box.
This automatically creates an Action called CommentEditor in the repository. - To test this works, lock the dashboard and click the + button. PhixFlow opens the Comment editor. Close the Comment Editor again and unlock the layout.
- To create context parameters that connect the Comment area to the selected record:
- drag the UID header from the Business Data grid onto the Comments + button. PhixFlow automatically opens a context parameter properties tab. Change the name to BusinessUID and save the properties.
drag the Name header from the Business Data grid onto the Comments + button. PhixFlow automatically opens a context parameter properties tab. Change the name to BusinessUID and save the properties.
The context parameters must have the same name as the Dynamic Text field on the dashboard in order to link them
- Test your changes
- Lock the dashboard and click the + button.
- PhixFlow opens the Comment editor. The dynamic text part of the header should now include the business name for the selected record.
- To see what context parameters are being used, right-click the Comments Editor dashboard and select Show Context Parameters.
- You can see that you are passing the Business Name and Business UID to the Comment Editor dashboard.
- Close the context parameter list and the Comment Editor dashboard.
- In the repository Actions, right-click CommentEditor and click Edit to open the action properties. (This action was created automatically in step 5.2.)
- Change the Name to NewComment.
- Expand the Context Parameters section and click Add. In the context parameter properties, set:
- Name: UID
- Expression: _NULL
- Save the context parameter properties.
- Save the action properties.
- Test your changes.
- In the dashboard Comments area, click + to open the Comment Editor. You can now type into the comment field.
- Notice the footer automatically changes the buttons in response to having a comment. This is controlled by the conditional formatting for the footer and buttons on it.
- As the Comments Editor is designed to edit existing comments. The controls to add and delete will be in the Comments area. This means you do not need the New and Delete button on the Comment Editor dashboard.
- Unlock the dashboard
- Right-click the New button and select Delete.
- Right-click the Delete button and select Delete.
- Lock the layout and close the comments editor.
Step 6. Set up the Comments area edit button
- Ensure the Business Data Manager dashboard is visible and unlocked.
- In the repository → Dashboards, drag CommentEditor onto the edit button, which is in the bottom right of the Comments area.
- In the action properties, change Name to Update Comment and save the action.
- To create context parameters that connect the Update Comment action to the selected record, drag the UID header from the Business Data grid onto the action properties → Context Parameters list. Click UID to open its context parameter properties tab. Change Name to BusinessUID and save the properties.
- Click Add. In the new context parameter properties tab, set:
the Name UID and save the properties.
Expression to _form.UID
(_form refers to the backing form.)Save the context parameter properties.
- From the dashboard Business Data Manager grid, drag Name from the header to the Action Context Parameters list.
- In the Context parameter properties, change the Name to BusinessName and save your changes.
- In the list of context parameters, drag BusinessUID to be second in the list and save your changes.
- To test your changes:
- Lock the dashboard and click the edit button.
- PhixFlow opens the Comment editor.
- Make a change to the comment and click Update.
- Notice that the changes you make are displayed in the Comments area.
Step 7. Configure the map
Unlock the dashboard
Click in the map area to open it's properties tab.
In the URL field, replace the <<ENTER KEY HERE>> text with the API key provided by Google.
Lock the dashboard