I have created a table, made up of several columns, in a perspective application. Data is directly entered into the table daily, by the users. Sometimes the data that is being entered is identical to a previous entry that has been made. Rather than having to re-enter that data, is it possible to select a row and copy the data out of a few of the columns and paste that data into another row?
Below is a quick sample of the table
As you can see, the data in the 2nd and 4th entries are similar aside from the date.
The columns I would like to copy would be Client, Eng., Eng Last Name ad Project #.
My initial thought was once the row is selected, and the user selects a "copy" button the data in the cells get written to parameters. From there, the user will select a row in the table and select a "paste" button and the data would be passed to the specific cells.
I'm not even sure if this would work, just kind of brainstorming right now. If anyone has a better idea, or has even done this before, I would definitely appreciate some help!
Your general approach is probably the best way to go about this, but your use-case is a little unclear. Is this data being added as a new (last) row? is it being inserted to some index in the middle? How is the data of the table stored? Is this Vision (looks like it) or Perspective? It matters, because you have different options available to you depending on the module.
The data would be entered after the initial entry, not necessarily the last row though. The data is stored in a SQL database and I am doing this in Perspective. The picture I had posted in my original question was just a quick thing I did in excel.
But are you adding an entry to a SQL table, or updating an existing row? The primary thing you'll need to tackle is going to be determining which row to copy values FROM, and - if updating an existing row - which row to put those values in.
Suppose you have a Table with only 5 rows. You want to copy (most) values from row 2 into row 5. Well, you need to select both rows in order to do this. But the selected data visible within props doesn't provide insight into which row was clicked first - only that rows 2 and 5 are selected. SO if a user wants to copy values from row 5 into row 2, the data looks the same within the selected data prop. So you can't manage this sort of copying.
Now, making a new row is really simple: You just select a row to copy, and your Button uses a script to insert a new row into your database table.