Masking a UD key field to match a date field

I need to make a child key be a date, and I want the entry system on the customization I’m going to make be date. If I try to add a custom date field editor, the customization comes back and says that it can’t be linked to a Character field (all of the UD key fields are character fields). When I make a new row in the Ubaq, I can map existing date columns to the key column using ttResult.LaborHed_ClockInDate.ToString(), and it works fine. However, I also need to be able to make a row without a laborhed_ClockInDate field available at the time of creation. (but it needs match that value when that date does come up.)

Can I make the customization so the entry and the mapping/masking keeps the character field consistent with a date field? Or do I need something like a data directive that duplicates a date field to the key field? (basically like my UBAQ does), or do I need to just make a pre-processing BPM on save converts a BPM data field (tied to my control) to the key field using the same code?

I tried using extended property maintenance, and it didn’t work, but I’m probably doing it wrong. I couldn’t find much guidance on what to type into the wide open format field.

I assume you are just using the Date Editor to display (since you cant change a key) - if so, easy workaround is the create a Calculated Field of date type then cast your Key1 to a date

CAST(UD100_Key1 as datetime)

Ah - after re-reading - I think you are creating records. You can do this, make a date editor, in customization you add an event AfterChange() or Leave() - copy the value as a formatted date string (whatever format you like) and save that into a hidden textbox epibound to Key field.

Also as you mentioned a PreProcessing BPM should be able to handle it as well.

Yeah, I was able to get a pre processing BPM to work.

1 Like