2.5 Creating a New View
Now that you can identify which
locations an employee has visited, it is time to expose that
information to end users. Follow these steps to create an Employees by
Location view on the Locations tab in the Tile Pane:
1. Click Locations in the Tile Pane.
2. Click the
Add New View button. Set the View Name to Employees by Location, the
View Type to Summary, and the Record Source to Employee Locations.
Click the Add New View button.
3. Edit the
Employees by Location view, and ensure that the left column displays
the list of neighborhoods and the right column displays the Employee’s
Display Name. This should happen by default.
4. Launch the
application and view the results in the browser. Now end users can
track projects, assign employees to those projects, and track employees
by location.
2.6 Adding a Macro
Recall from the previous macros
discussion that there are two distinct types of macros that can be
added to an Access web application: Data macros, which impact the data
in an app as an automatic reaction to data changes, and UI macros,
which add user experience options as a result of user behavior in the
application. For example, you could use a Data macro to automatically
copy contact details from the Consultant record to the Project table
after a Consultant has been assigned to the Project. User Interface
macros add interactivity elements to the application. Follow these
steps to add a pop-up to the app that enables an end user to see the
employee details of an employee assigned to a Project in the Datasheet
view.
1. In Access, click the Projects tile in the Tile Pane, and select the Datasheet View for editing.
2. Click the Consultant field; then select the Actions pop-up menu by clicking the lightning bolt button.
3. Click the On Click action button, and select OpenPopup from the list of available actions.
4. In the View field, select Employees List, and click OK.
5. Save changes to send the updates to the server; then launch the app to see the UI macro in action.
2.7 Coding for Access Web Applications
Unfortunately, there is simply no way
to write code to extend or change an Access web app. There are no APIs
published by Microsoft for Access Services or the ADS, and Microsoft
strongly recommends against attempting to modify the HTML, CSS, or
JavaScript emitted on the page of an Access web app.
2.8 Reporting and External Data
Data managed via an Access web app is
actually stored in a dedicated SQL Server database. The connection
details for the Access database are available in Backstage. In addition
to identifying the database’s connection path, the Access Backstage
view enables the creation of read-only and read/write user accounts. In
addition, the Info tab of the Backstage view allows for the creation of
client-side reporting databases. The Access reporting database cannot
currently exist as a cloud-based web application, so Access will
automatically create the required connections for reporting, as seen in
Figure 7.
In addition to Access web apps allowing for
external applications to access data, Access can leverage the data in
other data stores such as SharePoint and SQL Server to create linked
tables. In this manner, Access web apps can be leveraged to provide
complex business logic, whereas SharePoint offers easy data access and
management. When a SharePoint list is connected inside of Access apps
as linked tables, the connection is a read-only connection. Data
changes to the source list must be done inside of SharePoint.
3. Deploying Access Applications
Access 2013 has no deployment
story because an Access web app is online from the moment the
application designer supplies a location during the creation of the
app. When the app has been created and uploaded to the site, it becomes
available for other appropriately permitted users. Access apps can also
be deployed to the private corporate store and the Microsoft online Office.com
public store. Deploying an Access application online requires a code
submission to Microsoft Online where the code is packaged, reviewed,
and accepted to or rejected from the Office Store.