Display Rule For TIME Field

dss01

dss01

Member
Hello group...

When defining DD items we have an option to format Math Numeric values with commas (using CODE rule).
So similarly is there any way of creating a custom CODE format for the time field?

Requirement is, user enters time in a time field (for e.g. Y55UPMT, Copy of UPMT), say value entered is 104500; on field exit it should be displayed as 10:45:00.

One way to handle above requirement is to have two fields for time, 1st a string field, where user enters the value and we do manual formatting using JDE BSFN. And use a hidden Y55UPMT field for storing numeric value.

I was wondering, if same thing can be achieved by having a custom display CODE rule?
I have no idea if we can create a custom display rule OR what will be the complexity level of the customization.
So, if someone out there has created a custom display rule in the past please help me with how do we implement it?

Thanks in advance.

System details:
JDE EnterpriseOne 8.12
Toolset 8.98.0.2 (soon to be upgraded to 8.98.4.0)
Database Oracle 10G
 
dss01,

I have never heard of a custom display rule. That does not mean to say that it is not available or possible. The lack of a response possibly means that no one has heard of it. I did not reply myself for this reason.
 
Dss01,

Custom display rules can be implemented using BSFN , e.g."CO" and B0000095 - Format Company Number. It can be used to default "ss" part to 00. Unfortunately, data type for time field is Numeric(6,0) therefore it can accept 6 digits only. The best way to avoid using two fields on every form, that I can think of, is to add two fields in table and pre-insert and pre-update DB trigger to "copy" string time field to numeric time field. Too much hassle in my opinion, I always use two fields on a form.

Hope this helps,
Boyan
 
[ QUOTE ]
dss01,

I have never heard of a custom display rule. That does not mean to say that it is not available or possible. The lack of a response possibly means that no one has heard of it. I did not reply myself for this reason.

[/ QUOTE ]

I have used them but not nearly to the extent that I use custom Edit Rules. When I first discovered them I thought they were going to be really powerful until I realized they can also cause quite a few problems. For example lets say you create a custom display rule that turns numbers into words ("1" becomes "one"). You can do that and it will work... kind of... the problem is is that after a user types in "1" and it is displayed as "one", "one" gets passed to the control as the value, not "1". I think this even happens on QBE entry as well, so even if you override the display rule on a read only form or read only field, if the user types something into the QBE line of that field, problems can ensue. Last time I played with them I was trying to do some special formatting with negative numbers so that "-123.45" becomes "(123.45)" or something like that. If I remember correctly I think I did use it successfully in a very limited situation (like on a search and select form or something) but still ran into some issues. After that never really used them much. This was all back on Xe so maybe things have improved in 9.0 or maybe some people now some tricks to use them successfully...
 
Back
Top