I am looking into a similar situation. I wonder if I could use REI3 to make user management in Nextcloud user friendlier.
Which means: I need to display a list of users and I need to open a form on click on a row to edit that list entry.
As I understand, I can not have a list in a form that is not bound to a relation and is populated via a function.
So the solution is to have "nextcloud_users" relation. A frontend function on form load triggers a backend function that fetches the list of users via REST-API from Nextcloud, truncates the "nextcloud_users" relation and populates it from the REST-API result.
Then also a similar frontend / backend function setup on edit form save to write-back the change to Nextcloud via REST-API.
To communicate errors in the REST calls to the user, you use instance.abort_show_message in the backend function.
Is that the way to do this?