Hey @VV7,
You can achieve the functionality you're aiming for using a two-page WebApp setup with a small JS script in between to handle the filtering.
Page 1: Accept input from the user
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h3>Search for Recipients by First Name</h3>
<form method="post" autocomplete="off">
<label for="firstName">First Name:</label>
<input type="text" name="firstName" required />
<br><br>
<input type="submit" value="Search" data-nl-action="next" />
</form>
</body>
</html>
JS Activity (runs between Page 1 and Page 2)
var firstNameInput = request.parameters.firstName;
logInfo("Searching for recipients with first name starting with: " + firstNameInput);
var recipients = xtk.queryDef.create(
<queryDef schema="nms:recipient" operation="select">
<select>
<node expr="@id"/>
<node expr="@firstName"/>
<node expr="@lastName"/>
</select>
<where>
<condition expr={"@firstName LIKE '" + firstNameInput + "%'"} />
</where>
</queryDef>
).ExecuteQuery();
var ids = [];
var firstNames = [];
var lastNames = [];
for each (var r in recipients) {
ids.push(r.@id);
firstNames.push(r.@firstName);
lastNames.push(r.@lastName);
}
ctx.vars.recipientIds = ids.length ? ids : ["No matching recipients"];
ctx.vars.recipientFirstNames = firstNames.length ? firstNames : [""];
ctx.vars.recipientLastNames = lastNames.length ? lastNames : [""];
Page 2: Display the filtered results in a table
<!DOCTYPE html>
<html>
<head>
<title>Recipient Info</title>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: 8px;
}
</style>
</head>
<body>
<form autocomplete="off">
<h2>Recipient Info</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr>
<td><%= ctx.vars.recipientIds %></td>
<td><%= ctx.vars.recipientFirstNames %></td>
<td><%= ctx.vars.recipientLastNames %></td>
</tr>
</tbody>
</table>
</form>
</body>
</html>
This setup passes the input from the first page to a JS that queries the recipient schema and displays the results in a table on the next page.

Hope this helps!
Thanks,