I am trying to use UD as a proof of concept project to see if I can create a front-end using UD to allow editing rows, deleting rows, or add new rows to a SQL table.
Thus far, I’ve been able to execute the SQL query using
dbatools module, and to display the data in a
I was hoping the UDTable object allowed for modifying a row, but I didn’t see anything like that.
The next best thing I could think of is to have
New-UDButton objects that have “Edit” or “Delete” Or Add New" within the table object.
Below is a screenshot of a wireframe of my vision for this front-end (using the Edit/Delete buttons concept):
I’ve managed to do that (see below screenshot), but I’m having trouble getting the “current record” to be linked to the Edit and Delete buttons. Instead, it seems to return the entire object.
What I have now is:
When a user clicks the Edit or Delete button, it shows a
New-UDModal that displays another
New-UDTable that is intended to only show that row’s data (but currently shows the entire dataset again).
Am I going about this the wrong way? Is there an easier way to accomplish editing existing rows, or deleting a row? Did I miss edit/delete capabilities in any UDTable commands?
Is there a way I can “filter” the dataset to the “current” row tied to that row’s NameValuePairID? I tried using various combinations of
$Item.NameValuePairID but I haven’t got that to work.