UD table custom form

Hey guys and gals,

I was asked by our HR department to create a custom form for them to track injuries in the workplace. I haven’t made a custom form before so I just had a few questions. I know at least one of the key fields has to be populated in order to save anything and that I need to link columns to fields in the extended properties maintenance. How would I go about creating some of the fields in this HR form that aren’t related to any of our database tables ? For example, I want to include a field “Body Part Injured” with a combo box, but the values for this will just be body parts which obviously aren’t part of any database tables. If I just declare that field in the extended properties and then hard code some of the values, will those values get stored in the database in that UD table ?

Sorry if this is confusing, just trying to figure out how the backend portion would work with saving these records with custom fields/values

You should be able to store whatever you want in a UD table without any relationship to anything else. You’re just going to end up customizing the UD table’s stock form to fit your needs. You can certainly link a column to a UD Code list in the Extended Properties and the UD table will store those codes. If you built the form with Combo Boxes, the user should only be able to pick from your list of acceptable body parts, etc.

Rather than hard coding… I often use User Defined Codes for combos.
I find them easier to maintain and… using the Epicor wizard, easier to setup with a combo.


1 Like

Yep. And if you set up a new field UD field that has a list of options, definitely make use of the UD Code Type field in Extended Properties. By linking the UD Code here, most of the work is done for you anywhere you reference that field. The ComboBox will set itself up when you bind to that field, dashboards will set themselves up, etc.

Thank you sir, I appreciate the knowledge

Awesome !! This makes much more sense than hard coding the values lol. If I wanted to use a chkbox for a yes/no(boolean) value, would I have to define codes for yes or no as well ?

The Checkbox values are “built in”… you should only need to set the binding to a table.field for storing the value.

From your questions so far… I’m thinking you might be starting out?
If so… do you have access to the either EpicCare or EpicWeb sites - able to download guides?
e.g. Epicor ICE x.x Tools User Guide
or Epicor ICE x.x Customization User Guide

I always recommend users get these and review the examples before doing too much customization.

I do have access to EpicCare but not epic web. I will check for those guides, thank you for the suggestion and for the rest of all your (and others) help !! One last question, I created the user codes as suggested with all my custom fields but when I go into extended properties for UD01 I cant link those codes to the columns. The UD code type drop down doesnt have any data. Do I have to customize the form for UD01 first and add the codes adapter view to it ?

If you add an EpiCombo, then you should be able to search for the EpiBOName “Ice:BO:UserCodes”
then in SearchFilter specify you (User) CodeTypeID
and then Epibinding to the field you want.

Here is an example of a combo setting sheet from a custom Supplier entry form

Hope you have all been well,

I stepped back from this customization to work on some other projects. I spent yesterday working on this again, got all my elements linked and are displaying the right data. The last thing I am sort of confused on is the Keys.

I know that you dont have to use all the keys but this form is for Injury reporting and I was thinking of using EmpID as the key but a employee could have more than one injury so would I have to use a second key ? Also, do I have to implement any code in order to create new records or does the wizard automatically add it after I set my key(s)

I looked through those epicor documents that were suggested, but couldn’t really find anything about saving records/keys

If you are working with UD tables, you need to use the UD methods from the specific table. There are methods to add records (.GetNew), delete records (.DeleteByID), and update records (.Update). (And more!) You can use these methods either in custom code widgets, or as BO widgets in a BPM. The BO method is preferred, as it ensures all the right methods fire.

Regarding the keys, you do not need all 5 keys, and you can use any number of them. You can set Key1 as the empID. If that is the only thing linking your injuries, then you don’t need anything else. If you want to track what job an injury occurred during, or which part number, you could also include those in the Keys. Make sure your keys together represent a unique value. When you use methods like DeleteByID, you will have to supply the key fields, so the DB knows what records to delete.

Simply adding records to a UD table can be more difficult than it should be. Are you needing to do any validation on the fields the user enters? Do you need to check that they supplied a valid part number or a job number? If so, then a UBAQ and customized dashboard will work. The UBAQ will contain the BPM that does the adding/deleting records.

I’ll see if I can find a simple UD custom form for you as an example.

Very thorough and useful information, thank you !!! No validation is needed. Its just a form for HR to record injuries and go back to view the records if they need to. There is also no jobs/parts references needed, strictly a injury logging form

If I only use key1 as EmpID and that employee has another injury, wouldn’t it spit our an error that there is already a record ? I was thinking of using an InjuryID. So after the record is saved, it creates a unique InjuryID and then having a search in the form where they can search by injury IDs. Is that at all possible ?

Yes, Good idea. I often create unique IDs to help uniquify my keys.

Here is a dashboard I was working on a while back that was meant to track process improvement. We haven’t implemented this, but I believe the basic functionality is there.

Import these BAQs to help populate some boxes:
OpsForJob.baq (18.7 KB)
PartsForJob.baq (13.3 KB)
RGIDForOp.baq (21.7 KB)
Then import this UBAQ as the base for the dashboard:
CPI.baq (90.6 KB)
Here is the dashboard:
CPIEntry.dbd (241.8 KB)
And here is the customization for it:
App.CPIEntry.MainController_Customization_Custom1_CustomExport.xml (286.3 KB)

You have to deploy the dash, then open it in customization mode to import the customization, save it, close it, and reopen it with the customization again to see it.
Poke around in there and let me know if you have any questions.
Good Luck!