Extended UD Table column initial value

When is the initial value of a column set? When the record is first created?

For example, would the following UD field be set when the record is first created?

And does the Required checkbox have to be set? I left it unset as this field doesn’t appear on the form and I didn’t want the processing to halt, if that somehow got FUBAR’d.

Works just like MS SQL has specified, the field is assigned the default value when the record is created

Yet it’s not being created.

Did you add the default value by chance after your originally created it? I’ve seen it not go back and update the table if you don’t do it on the very first try

I thought that might have been it. But the last two entries were definitely after the pushing the update.

I’ll try it with the UD field set to “Required”

No not the entries on the table, I am talking about the actual table definition. At least on 10.0 if you go after the fact and change that it doesn’t go back to the table and recreate it always…

Here’s the sequence

Last week I added the UD field, did the schema update (or whatever it is called), and did the IISRESET. I assume that all worked because the field “EntryDate_c” (for the APInvHead table) shows up in the BAQ.

This morning, I added a new invoice to an AP Invoice entry group (was an existing group), and expected the field to be auto populated.

The field is not on the AP Invoice form. Is that a problem? I figured the Record creation is when it is set, and not that the field UI element is auto-populated, and then that UI objects value used for the record creation.

Hmmm … setting the UD to required gives me an error when the record is trying to be created.

So I guess it does just initialize the UI object with the initial value, and then use that for the record creation.

Behind the scenes, I see a lot that the business logic is creating a record with one command, and then updating it. It’s not surprising to me that default value functions like this usually do not work.

I recommend biting the 5 minute bullet and just creating a data directive on APInvHed that 1. Checks for condition at least one added row in the APInvHed table and 2. Set Field APInvHed.EntryDate_c = BPMFunc(today()) or whatever your current version implementation shows.

That’s pretty much what I did in V8. I thought (wrongly so) that I could take advantage of the initial value setting.