Parsware
All articles

Start here

Build your first table and view in Parsware

A step-by-step walkthrough, from an empty solution to a working app. Create a table, add five kinds of field, build a filtered view, and open it with real rows in about ten minutes.

A Parsware app called Asset Tracker in dark mode, listing six assets with their serial numbers, the people they are assigned to, purchase dates and costs, next to the title "Build your first table and view"

Most business apps start the same way: a list of things someone needs to keep track of. In this walkthrough we build one from nothing, a register of the company's equipment. We make a table, add fields to it, build a view that shows the right columns and rows, and open the result in an app.

Every picture below is the real product, captured while this walkthrough was being run.

Before you start

You need a solution to work in. A solution is the package your work lives in. It is what you later move from a development environment to test and production. Every solution belongs to a publisher, and the publisher's prefix is put in front of everything you create, so your names never clash with someone else's.

In this walkthrough the solution is called Sales, and its publisher's prefix is con_. Open Solutions, then open your solution.

Step 1: Create the table

In the solution, choose Tables in the left rail, then New.

The New table drawer, with Display name "Asset", logical name con_asset, plural "Assets" and the Laptop icon
  • Display name: Asset, which is what people see.
  • Logical name: fills itself in as you type, with the prefix in front: con_asset. This is the name scripts, reports and the API use, and it can't be changed later, so check it now.
  • Plural display name: Assets, used for lists and navigation.
  • Icon: optional. Search the icon library for one that fits. We chose Laptop.

Choose Save. The table's Fields page opens with one field already there: Name, the primary field every table has. Two other things were also created for you: a main form and an All Assets view. So the table is usable straight away, before you design anything.

Step 2: Add fields

On the Fields page, choose New to open the field drawer. Each field needs a display name (its logical name fills itself in again) and a data type. We'll add five fields, each of a different type, to show the range.

Serial Number: text, required.

The New field drawer for Serial Number: data type Text, maximum length 100, Required ticked

Tick Required. As the note under it says, required is enforced on forms, not in the database. The column still accepts an empty value, and a single form can relax the rule where it needs to.

Choose Save & New to go straight on to the next field. Then add:

Field Data type Setting worth changing
Purchase Date Date/time Default control set to Date, because the time of day doesn't matter here. Persian date controls are available in the same list.
Purchase Cost Decimal Precision and Scale set how many digits the number has in total and after the decimal point.
In Service Boolean Shown as a check box by default, or as a toggle.
Assigned To Lookup Related table set to Contact.

Assigned To is the most useful of these. A lookup doesn't store a name typed by hand. It points at an actual Contact record, so the app offers a searchable list of real people, and every asset stays linked to the person's record even if their name changes.

The New field drawer for Assigned To: data type Lookup, related table Contact

The Default control on every field is set once, here. Every form and view that shows the field uses it unless it deliberately chooses otherwise, so you don't have to set it again on each one.

After the fifth field, the table looks like this:

The Fields page listing Name, Assigned To (Lookup to contact), In Service, Purchase Cost, Purchase Date and Serial Number

Step 3: Build a view

A view decides two things: which columns a list shows, and which rows it includes. We'll make one that lists only the equipment still in use.

Choose Views in the table's left rail, then New. Name it Assets in Service and tick Default view, so the app opens this view first.

Columns. The table's fields are listed on the left under Available fields. Drag each field into View columns, in the order you want the columns to appear. The preview underneath updates as you go. Drag a column back out to remove it, or along the row to move it.

The View Designer with Name, Serial Number, Assigned To and Purchase Date already in View columns, and Purchase Cost being dragged in

Rows. Choose Filter at the top of the designer, then Add condition. Set it to In Service, Equals, Yes, then choose Apply.

The Filter drawer with one condition: In Service Equals Yes

Conditions can be grouped with And and Or to build more complex filters. One is enough here. Choose Save.

Step 4: Put it in an app

A table becomes something people use when it is in an app. In the solution, choose Apps, then New.

The New app drawer: Asset Tracker with the Laptop icon, and a navigation group Equipment containing the Asset table

Name the app Asset Tracker. Under the navigation, name the first group Equipment, and add the Asset table to it with the table button. The picker filters as you type, so a long list of tables is no problem. Set Home page to Asset and choose Add.

The result

Open the app from the environment's app list. Add a few assets with New on the command bar, or use Import data to bring them in from a CSV file. We added eight, two of them no longer in service.

The Asset Tracker app showing the Assets in Service view: six rows with name, serial number, assigned contact, purchase date and purchase cost

The app opens on Assets in Service. It shows the five columns in the order we set, the contact each asset is assigned to, and six rows: the two out-of-service assets are filtered out. All Assets is still available from the view picker under the title, for when you need to see everything.

What you built, as the solution stores it

Each thing you just made in a designer is saved as a plain document, and that document is what travels in the solution. Seeing it once makes the rest of the platform easier to follow, because every designer you meet later works the same way. This is the Asset table:

{
  "logicalName": "con_asset",
  "displayName": "Asset",
  "displayCollectionName": "Assets",
  "publisherPrefix": "con",
  "primaryField": "con_name",
  "fields": [
    { "logicalName": "con_name", "displayName": "Name",
      "dataType": "Text", "maxLength": 200, "isRequired": true, "isPrimary": true },
    { "logicalName": "con_serialnumber", "displayName": "Serial Number",
      "dataType": "Text", "maxLength": 100, "isRequired": true },
    { "logicalName": "con_purchasedate", "displayName": "Purchase Date",
      "dataType": "DateTime", "defaultControl": "Date" },
    { "logicalName": "con_purchasecost", "displayName": "Purchase Cost",
      "dataType": "Decimal", "precision": 14, "scale": 2 },
    { "logicalName": "con_inservice", "displayName": "In Service", "dataType": "Boolean" },
    { "logicalName": "con_assignedto", "displayName": "Assigned To",
      "dataType": "Lookup", "targetEntity": "contact" }
  ]
}

And this is the Assets in Service view: the columns in their order, and the one condition that decides the rows.

{
  "logicalName": "con_asset_inservice",
  "displayName": "Assets in Service",
  "entity": "con_asset",
  "viewType": "Public",
  "columns": ["con_name", "con_serialnumber", "con_assignedto", "con_purchasedate", "con_purchasecost"],
  "filterGroup": {
    "connector": "And",
    "conditions": [{ "field": "con_inservice", "operator": "Equals", "value": true }]
  }
}

You never have to write these by hand. But you can, and a file written by hand is checked against the same schema as one saved from the designer. When you compare two versions of a solution, these are the lines you compare.

Choosing names you won't regret

A logical name can't be changed once the table or field is saved, because scripts, reports, views and the API all refer to it. Thirty seconds of care here saves a table rebuilt later.

  • Use the singular for the table. con_asset, not con_assets. The plural is the plural display name, and the navigation and lists use it on their own.
  • Name what the field holds, not where it appears. con_purchasecost stays right if the field moves to another tab; con_tab2cost doesn't.
  • Leave the prefix alone. It comes from the solution's publisher, and the logical name is filled in with it. If the prefix is wrong, you are in the wrong solution, which is worth finding out now. Publishers and solutions explains where it comes from.
  • Display names can change at any time. Rename Asset to Equipment next year and every form, view and app follows, with the logical name and the data untouched.

Picking the right data type

The data type decides how a value is stored, which control edits it, and which filters a view can apply to it. The five used here cover most registers, but it is worth knowing the others before you settle on text for everything.

You want to store Use Why not text
A fixed choice, such as a status or a category Option set A list can't be mistyped, and it can have colours. See Option sets.
A link to another record Lookup The link survives a rename, and the related record opens with one click. See Lookups.
A whole number, such as a quantity Integer Sorting and totals work, and 10 sorts after 9.
Money or a measurement Decimal Precision and scale are enforced.
A reference such as AST-0042 Auto number It numbers itself. See Reference numbers.
A photo or a document Image or File The file is stored with the record. See Files and pictures.

Every field type, explained goes through all of them, including the multiline text, state and reason fields every table can have.

The form you didn't have to build

When you saved the table, the platform also created its main form. Open any asset from the view and that form is what you see: the name at the top and the fields in the order you added them. It's enough to start entering data on the same afternoon.

Later you will want to arrange it: a Details tab and a Purchase tab, two columns, the assignee near the top. Forms that fit the job covers that. For now, it's worth knowing two things about it.

  • Required is a form rule. The Serial Number field is marked required, so the form won't save without it. An import or an integration writing straight to the table isn't stopped by the form. When a value must never be empty whoever writes it, add a server validation rule.
  • The form already does the right thing with each type. The date opens a calendar, the decimal refuses letters, the check box is a check box and the lookup searches contacts as you type.

Getting your existing list in

Most teams don't start from an empty register. They have a spreadsheet. Import data on the command bar takes a CSV file, matches its columns to the table's fields by name, and creates one record per row. A column called Assigned To holding a contact's name is matched to that contact. Import records from a spreadsheet walks through it, including what happens to rows that don't fit.

Who can see it

The app you added appears in the apps list for people whose security roles let them use it. As the maker you see it already. For the rest of the team, give them a role that can read the Asset table and open Asset Tracker. Your first app, shared with the people who need it shows how, and Security in Parsware explains what a role can allow.

If something doesn't look right

  • The table isn't in the app's table picker. It's in a different solution. Open the solution the table was created in, or add the table to this one.
  • The view shows every asset, not only those in service. The filter wasn't applied before saving. Open the view, check the Filter drawer, choose Apply and save again.
  • The app opens on All Assets. Default view wasn't ticked on Assets in Service. Tick it and save; the app picks it up the next time it opens.
  • The lookup offers nobody. There are no contacts yet in this environment. Add one, or import your people first.

What we built

  • A table with a primary field, created with a form and a default view.
  • Five fields, each a different type: text, date, decimal, yes/no and a lookup to another table.
  • A view with chosen columns and a filter, set as the default.
  • An app that puts it in front of the people who need it.

All of it lives in the solution, so it moves to your test and production environments as one package, with the same names, columns and filter.

Where to go next