Respected Contributor.. M_A_A Respected Contributor..
Respected Contributor..
599 views

Display Creation Time along with Date on Request Forms and Search Results

Jump to solution

I am having an impossible time showing Creation Time of the Creation Date on Demand Management Request Forms, and Request Search Filters and Results.

See attached file.

Does anyone have a solution to accomplish this?

Michael A.

0 Likes
1 Solution

Accepted Solutions
Outstanding Contributor.. Amishra Outstanding Contributor..
Outstanding Contributor..

Re: Display Creation Time along with Date on Request Forms and Search Results

Jump to solution

Hi Michael,

Not sure why you need a on creation rule, i wont add that.. I would just have a on page load rule (see snippet) that would populate the creation date into the new field. This creation date is the same that is recorded in OOTB "Created On" field. This doesnt change the moment you 'Save Draft' or 'Submit' the request. So it should be cool there..  

I would populate the rule using 'sysdate' as that will change every time you load it etc.. so stick to just 'Creation Date' from kcrt_requests table or [REQ.REQ.CREATION_DATE] either should be fine (and that is trick around this)

Well, to be fair, it is not a duplicate data, one is just a short date format and other is long 🙂 Anyways, i will leave it at your judgement 🙂

Finally, In my instance i am not allowed to have 'Created On' in my results field of the rule, not sure how it is allowing you.

Also SQL = select '[REQ.CREATION_DATE]' ,'[REQ.CREATION_DATE]' from dual, i would modify it to get the date time ie. include TO_CHAR('[REQ.CREATION_DATE]','YYYY-MM-DD HH24:MI:SS').

 

Hope it resolves!

 

 

Ajay

 

Regards,
Ajay Mishra
3 Replies
Outstanding Contributor.. Amishra Outstanding Contributor..
Outstanding Contributor..

Re: Display Creation Time along with Date on Request Forms and Search Results

Jump to solution

Hi Michael,

Don't think you can do that with the out of the box 'Created On' field; As a workaround - I would create a custom field in the header say e.g. 'Created ON New'; would set this as a 'Date Time (Long Format)' field, but set it to Display only.

Now have a rule on page load to populate the value of 'c'eated on new' with that of 'created on' field

The SQL would look like Date Time (Long Format) : select to_char(creation_date,'YYYY-MM-DD HH24:MI:SS'),
to_char(creation_date,'YYYY-MM-DD HH24:MI:SS') from KCRT_REQUESTS Where request_id = [REQ.REQUEST_ID]

Once you do this, you can use this new field to report on or in search results. 

Refer Attached snippets. 

 

Should you need any further assistance, please let me know. 

Guess, others may have other better options, but this is just my recommendation.

 

Ajay 

Regards,
Ajay Mishra
0 Likes
Respected Contributor.. M_A_A Respected Contributor..
Respected Contributor..

Re: Display Creation Time along with Date on Request Forms and Search Results

Jump to solution

Ajay, as always, thanks for the quick response.  I had already gone that solution route, but was not too happy with the results.  Here is some of my findings since starting to solve this problem.

1. I hate duplicate data in each row.  The Creation Date, and time, is already recorded for the request.  But as you indicate there is no way to get to the timestamp portion for use that I can see.  So creating a User Defined date field seems to be the only answer.

2. I had tried the "On Creation" rule, but the problem was it loads the timestamp value as soon as you say "New Request", regardless of when you actually do the physical creation or save.  This has potential for the true Creation Date/Time to be completely different from the one created by the rule.

3. I cannot figure out a rule that will fire on the first request save, going from Not Submitted, to the 1st created status/workflow step.  Basically, the first request save.  I had tried every rule, using both Creation Date and Sysdate, but the rules never run, as there is no proper trigger to get change on Creation Date or on the User Create Date/Time field, or anything it seems on initial save of a request record.  I cannot find the Event or the Dependencies that will execute such a rule on the 1st request save.

4. The only thing that i got to work that comes close is this rule, but am not happy that I have to do this approach.  I did define a Request user date field in the Request Header, Created On:  - 

Request Rule Configuraiton - 

Rule Event: Apply on Page Load

Rule Type: Advanced

Dependencies: Created Time: contains any value

Dependencies: Created On: is null

Results goes in Created On:

SQL = select '[REQ.CREATION_DATE]' ,'[REQ.CREATION_DATE]' from dual

So inconclusion, this does work, provides a user defined field to display on the Request form, and in Advanced Search Filters and Results.  But, am not happy that I had to perform all these tricks to get a formated display of an existing field.

Michael A.

0 Likes
Outstanding Contributor.. Amishra Outstanding Contributor..
Outstanding Contributor..

Re: Display Creation Time along with Date on Request Forms and Search Results

Jump to solution

Hi Michael,

Not sure why you need a on creation rule, i wont add that.. I would just have a on page load rule (see snippet) that would populate the creation date into the new field. This creation date is the same that is recorded in OOTB "Created On" field. This doesnt change the moment you 'Save Draft' or 'Submit' the request. So it should be cool there..  

I would populate the rule using 'sysdate' as that will change every time you load it etc.. so stick to just 'Creation Date' from kcrt_requests table or [REQ.REQ.CREATION_DATE] either should be fine (and that is trick around this)

Well, to be fair, it is not a duplicate data, one is just a short date format and other is long 🙂 Anyways, i will leave it at your judgement 🙂

Finally, In my instance i am not allowed to have 'Created On' in my results field of the rule, not sure how it is allowing you.

Also SQL = select '[REQ.CREATION_DATE]' ,'[REQ.CREATION_DATE]' from dual, i would modify it to get the date time ie. include TO_CHAR('[REQ.CREATION_DATE]','YYYY-MM-DD HH24:MI:SS').

 

Hope it resolves!

 

 

Ajay

 

Regards,
Ajay Mishra
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.