Paste Insert or Paste Update with UD Table

Does the Paste Insert or Paste Update functionality NOT work with UD tables?
I get a Paste Error when trying to do so.

it should work… I have done it (assuming you are talking about List views)… are you in a “simple” ud table or one of the more complex Parent/Child UD tables?

1 Like

Tim,
I am glad to hear that this is possible.
I am trying to populate an epiUltraGrid, (a UD Child table, linked to a quote) that is a Data Entry Grid Box.
Would that function similar to a List View?
Brian

There might be some hidden columns that need to be displayed. Maybe one that holds the Quote number? You’d need that in the UD table, but wouldn’t normally show it in the UI (as they would all be the same value - that matches the Quote being worked on.

I do have the Key fields hidden, so when I try to Paste Update or Paste Insert, I get a generic “Paste Error - Unable to complete Paste Operation”. If I unhide the Key fields , copy to excel, add another line (with only the required Key fields [1, 2, and 5] populated) then I get a Business Logic Error, Key1 must be unique; Key2 must be unique; Key3 must be unique; Key4 must be unique; Key5 must be unique.

I’m not that familiar with Child tables. But it looks like the data you’re trying to paste isn’t enough to make a new record.

When you copied to excel, copied the line, updated the copied line and then tried to Paste Insert, it was just the added line right?

If there were lines 1, 2, 3, and you made a new one (#4) in Excel where #4 was a dupe of 3 (but with the key field for the line updated from 3 to 4), you’d only be able to either A) Paste Updates lines 1-3, OR B) Paste Insert line 4

You could post a screenshot of the contents of your excel you are trying to paste in. It should work I use and abuse UD100 and UD100A all day long.

1 Like

If I try to Paste Insert 1 new line, I get the Paste Error “Unable to complete Paste Operation”.
If i change data in 1 line and then Paste Update, then I get the Business Logic Error “Key1 must be unique; Key2 must be unique; Key3 must be unique; Key4 must be unique; Key5 must be unique”. I am not using Key 3 or 4.

If you are pasting into UD100 then you must have Key1 - Key5 be Unique (non-repetitive, its an insert not an update), you can leave Key3 and Key4 blank, then Key1, Key2 and Key5 must always be unique, can’t use the same combination twice.

Example:

Key1, Key2, Key5, Character01
1, 1, 1, "Hello"
1, 1, 2, "Hello"
1, 1, 3, "Hello"
1, 1, 4, "Hello"
1, 2, 1, "Hello"
5, 1, 1, "Hello"
1, 1, 2, "Hello" /* ERROR! Already exists */
"", "", "", "Hello"
"", "", "", "Hello" /* ERROR Blanks already exist */

If you are doing the Paste Insert on UD100A then there are Key1 - Key5 which are UD100’s Keys, you must specify those unique as well!, and also ChildKey1 - ChildKey5, which are UD100A’s Keys.

Example:

Key1, Key2, Key5, ChildKey1, ChildKey2, Character01
1, 1, 1, "ImAChildKey1", 1, "Hello"
1, 1, 1, "ImAChildKey1", 2, "Hello" /* this is okay because the combination of Key1 - Key5 + ChildKey1 - ChildKey5 is unique */

If you do the following:

ChildKey1, ChildKey2, Character01
"ImAChildKey1", 2, "Hello" /* Even tho you are not using Key1 it is setting them to blanks */
"ImAChildKey1", 5, "Hello" 

Then technically you are setting Key1 - Key5 to “” and it will error eventually.

Snippet of UD100A Schema:
image

1 Like

I am pasting into UD01, but have linked it as a child to my quote record.
Because I need more than 10 ShortChar fields, I decided to use UD01.
Would it be better for me to use UD100, and then also use some LongChar fields?
This table should grow by about 8,000 lines per year.

Key 1 is Quote Number, Key 2 in Quote Line Number, Key 5 is always increased by 1 for each new line (making the combination of keys unique). I can manually add new lines and type in the details, but Paste Update or Paste Insert gives me errors. Below is a sample of what I have in the UD table.

What you have there should work since the combination Key1 + Key2 + Key5 makes the row unique.

Try perhaps without selecting the Header row if you havent yet. Also how does your UI Grid look like, I assume its in the exact same order.

I am not copying the header line when I paste update. This excel is made from the UD table, right click, copy to excel, so the columns are in the same order.

Am I better off using UD01 (using only number and short char fields) or UD100 (using number, short char, and some long char fields, only because I need more than 10 char fields).

Maybe its the fact that column “Product Description” (along with a few others) is of type text, and you have a numeric value (as opposed as a number stored as a text).

You can extend UD tables. Some people do that over using the built-in Number01, Char01, etc… That way the column names actually mean something.

Calvin,
I only have 1 column that is a number, the rest are Short Char text fields. I believe that a text field will accept a number, but I know that a number field will not accept any non numeric character.

I had not thought about extending UD tables. For UD01 tables you get 10 Char, 20 Num, 20 Date, 20 Check Box, 20 Short Char columns. For UD100 tables, you get the same quantity of most columns, with the exception being that you only get 10 Short Char. To extend a UD table, do you convert a column type (like Date) into another type (like Short Char)?

So I now have paste insert and paste update working on my UD Child table. It turns out that the format and mask ID are important for paste function to work. I had an integer column and I did not want to see .000000 after each integer. To get rid of the zeros after the decimal, I input the wrong text on the format of that Column Properties (I did not use the # that is now in my attached image). My incorrect format made the number in the column appear as I wanted (a whole number with no decimal point or zeros after the decimal), but it broke the functionality of Paste Insert and Paste Update. I have corrected the format as shown in the attached image and now Paste Insert and Paste Update work with my UD Child table.
image

1 Like

Better late than never …

You just add columns like you would for any other table. I don’t think I would go back and move data from an original column like Number01 to my new UD column PONum_c. Because then any customizations and BPMs would need to be updated.

Using an extended UD column on a UD table saves you from having to document exactly what each builtin column is. (“Was Number01 the linked PO num or the Packer num?”)

1 Like