Parsware
All articles

Power Apps

Add a child row from a drawer

A drawer on the case form with one box: type a task, press Create, and a task linked to this case is written without leaving the form.

A New task drawer beside the case’s task list, with Ring the courier typed in

Adding a task to a case in a model-driven app opens the task’s form and leaves the case. This demo adds it from a drawer on the case form, and the case stays put.

The Tasks section: 5 tasks on this case, listed, with an Add a task button

One box, and the case’s id

Add a task opens a drawer drawn on the same screen. Create writes the task with the case’s id in its lookup. The id comes from the new record object, the record the form is showing:

createRecord("par_casetask", { par_name: state.newTask, par_case: record.id, par_done: false });
notify("Task added.");
closeEndDrawer();

The New task drawer: What needs doing?, with Ring the courier typed in, and Create

The same handler then reads the case’s tasks again, so the list shows the new one at once:

6 tasks on this case, Ring the courier among them

A lookup is written as the target’s id. A new case has no id until it’s saved, so the button is disabled until then.

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 one of the older cases. Tasks is on the Panels 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.