Parsware
All articles

Power Apps

Tags as chips

A text column of tags shown as chips you can add and remove. split() cuts the text into a list, and a repeater draws a chip for each piece.

Four tag chips, network, vpn, remote and remote access, with a box and Add

Tags kept in one text column, separated by semicolons, are easy to store and awkward to read. This demo shows Tags on a case as chips, each with a cross to remove it, and a box to add one.

Three chips, network, vpn and remote, each with a cross, and an empty box with Add

From text to chips

A new function, split(text, separator), cuts the column into a list, trims each piece and drops empty ones. A repeater is bound straight to it:

split(field.value, ";")

Each piece of plain text arrives in the row as row.value, so the chip’s words are row.value. Its cross rebuilds the column without it:

var kept = [];
var parts = split(field.value, ";");
var i = 0;
for (i = 0; i < parts.length(); i = i + 1) {
  if (parts[i] != row.value) { kept.push(parts[i]); }
}
setFieldValue(kept.join("; "));

Add appends what was typed, with "; " in between:

A fourth chip, remote access, after typing it and pressing Add; the column now reads network; vpn; remote; remote access

Try it

  1. Install the three Parsware for Power Apps solutions, samples included (Install it).
  2. Open Sample data and press Replace, so the newest columns are filled (The samples, and sample data).
  3. Open a case. Tags is on the Drawn controls tab.

The pictures show the shipped design running on demo data in Parsware’s own runtime. In Power Apps the form, the side pane and the dialog are the app’s own.