Parsware
All articles

How-tos

How to import a sample solution

Import a sample from a file, choose whether to bring its demonstration rows, and open what it brought: tables, an app and a managed, read-only solution. How-to video H012, step by step.

A bright cover reading "How-to · H012: Import a sample solution", with "One file in, tables and an app out" under it, the steps Import → File → Demo data → Open, and two screens from the video.

How-to H012 · 2 min 1 s. A complete tutorial: every click the video makes to import a sample, what the platform checks before it writes anything, and what you get afterwards. Every picture is a frame of the video.

Many how-tos start from a sample solution: one file that brings tables, an app and a few rows to try them on, so you can follow along without building anything first. In this tutorial you import Room bookings, a calendar of meeting rooms.

Before you start

  • The Sales Test environment from How to create an environment. Any environment that isn't Production works.
  • The sample's file. Every sample is one file ending in .solution.json. The video uses mda-bookings-on-a-calendar.solution.json, from the platform's sample solutions.

What this one brings:

Kind Name Logical name
Table Booking par_booking
Table Room par_room
Option set Booking kind (Meeting, Training, Interview, Maintenance) par_bookingkind
App Room Bookings par_bookings_app
Demonstration rows Three rooms

Step 1: Check the environment

A solution is imported into the environment selected at the top. Check the environment picker reads Sales Test.

Step 2: Start the import

  1. Select Solutions in the rail, under Maker. Main and Sales Tracker are already listed.
  2. Select Import in the command bar.
  3. Choose the package file.

The platform reads the file before importing anything, and the dialog names three things. Read them before you go on:

  • the solution: Room bookings — a maker's own calendar;
  • its version: 1.2.0;
  • the environment it is going into: Sales Test.

Step 3: Decide about the demonstration data

This package carries demonstration data: three rooms, so the calendar has something in it straight away.

  • It is brought only if you tick the box. Tick Include demonstration data (3 rows).
  • A Production environment never takes it: there the box is disabled.
  • A package's configuration rows, the ones it needs to work, always come.

The import dialog: Import Room bookings — a maker's own calendar 1.2.0, into Sales Test, with Include demonstration data (3 rows) ticked.

Step 4: Import

Select Import. The screen says Importing … while it runs. You can leave the screen: the import carries on in the background, and the Solutions screen picks it up again when you come back.

Before it writes anything, the platform checks the package: every form, view and app must refer to a table that is in the package or already in the environment. If an import fails part way, nothing is kept.

When it finishes, the screen says Solution imported and Seed data: 3 rows created.

The Solutions list after the import: a note reading Seed data: 3 rows created, and Room bookings listed as Managed, by Parsware Samples.

It is listed as Managed, owned by its own publisher, Parsware Samples, at version 1.2.0. An import brings its publisher with it.

Step 5: Open what it brought

Select the solution's name. Its Overview lists what it brought, one tab per kind: two tables, Booking and Room, one option set, and one app, Room Bookings.

Step 6: What managed means

A managed solution is read-only in this environment:

You can You can't
Open and look at every component Change a component
See its Dependencies Add existing components to it
Export it Remove a component from it
Uninstall it

It changes only when a newer version of the same file is imported, which is an upgrade. To take it out of the environment, select Uninstall. That removes its tables, and the rows in them, demonstration rows included.

How a table looks inside the package

Every component in the file is a plain document. The Room table, for example:

{
  "logicalName": "par_room",
  "displayName": "Room",
  "displayCollectionName": "Rooms",
  "publisherPrefix": "par",
  "primaryField": "par_name",
  "secondaryField": "par_building",
  "fields": [
    { "logicalName": "par_name", "displayName": "Name", "dataType": "Text", "isRequired": true, "isPrimary": true, "maxLength": 80 },
    { "logicalName": "par_building", "displayName": "Building", "dataType": "Text", "maxLength": 80 },
    { "logicalName": "par_seats", "displayName": "Seats", "dataType": "Integer" }
  ]
}

This is the same document the table designer writes when you build a table by hand, which is why a table can be moved between environments, reviewed, or written by an assistant.

If something goes wrong

  • Import is greyed out. Another import is running in this environment. Only one runs at a time.
  • "Import … first". The package is built on another solution that isn't in this environment, or is too old. Import that one first.
  • The demonstration box is disabled. The environment is Production.
  • The import fails. The screen says why, and nothing was kept. Fix the cause and import again.

What you built

The sample's tables, option set and app, with three rooms in them, ready to follow a video with. Opening the app is the next how-to.

Read more

Is there a task you would like to see done step by step? Tell us. parsware.com/contact