New row of UD table

On a user defined table, if I click New, New UDXX, it adds a new row and pre-populates the key fields I need. Upon entering data in a row, if I tab off the final column, a new row is added, but it does not bring in the same key fields that adding the New UDXX does.

Is there a Form Event Wizard or an Event Wizard function that will basically get a New UDXX upon tabing off the last column (to pre-populate the key fields on the new row the same way that New, New UDXX does)?

Is a BPM used to auto populate those fields? If so, then it needs to be tweaked to include this other method.

Calvin,
If there is a BPM running, it is the default used for UD tables (I did not create one specifically for this).

I suspect there is an Event Wizard or Event Form Wizard that would add a new UDXX row when I tab off the final cell in the last row (to add a new row). I have played around with the Event Form Wizard a bit but was not able to get the behavior I was looking for.

Are you referring to:

  • Making a new Extended table (like OrderHed_UD)
  • Adding Coulmns to an extended table (like making OrderHed_UD.MyRef_c)
    OR
  • Adding rows to a built-in UD table (like UD_01)

Calvin,
The third option. Adding rows to a built-in UD table (like UD01).
Brian

There must be a customization in the form, if there isn’t a BPM. Otherwise, where are these default values coming from?

We are multi-company, so the if I click New, New UD01 from the tool bar, it automatically brings in the company number, Key 1 is linked to the quote number, Key 2 is linked to the quote line number (Key 3 and 4 are not used), and Key 5 increments. I linked those fields when I used Add User Defined Table As Child (linking the Data Views to the UD Adapters; then Mapping the native View/Fields to UD Table Views/KeyFields). Those are the data fields that I need pulled in.

In the Form Event Wizard, I tried to copy the code from baseToolbarsManager_ToolClickForUD01 , and created a new event type (BeforeRowChange) inserting the code from baseToolbarsManager_ToolClickForUD01, but that gave me some errors (I an a novice with C#).

I really want to mimic the behavior that occurs when clicking New, New UD01 to also occur when someone tabs off the last cell and a new blank row is created.

1 Like

Okay… that makes sense. I didn’t realize it was a Child Table.

And FTR - I’ve never used Child Tables.

But using the basic form for UD tables, the same BO (Ice.Proxy.BO.UD39.GetaNewUD39) happens, regardless of whether you choose File -> New from the menubar, or tab out of the last column of the grid.

Calvin,
So it seems odd that my UD child table behaves differently if I add New, New UD01 compared to tabbing off the last cell of the last row. I would have thought the built-in functionality would do exactly what I am trying to do.
Brian

Do a trace, and and see what fires when you use the New, New UD01. And compare to what happens when you hit tab to make a new row.

My guess would be that hitting the tab key, merely creates a new row on the UI, and doesn’t actually create a new row in the DB until you save (or move off that row)

I used the Event Wizard to select:
Control Type Filter: EpiUltraGrid
Custom Control: epiUltraGridC1
Check the Data Entry Grid box
Available GetNew Method: GetNewUD01View

Then I updated All Event Codes.

Now when a user tabs off the final cell of the last row, a new row is created with the required Key fields pre-populated.