History Date

Discuss your general Proclaim related queries here.
Post Reply
rajeev108
Posts: 275
Joined: Sat Feb 11, 2012 9:17 am
Has thanked: 9 times
Been thanked: 2 times

History Date

Post by rajeev108 » Wed Dec 05, 2012 10:55 am

I am using this logic to pick up the last date from the history for a particular action

v-result = FETCH( "CONTENT" , "History" , "created_date" , "FOR LAST History NO-LOCK WHERE History.case_no = '" + {case.key} + "' AND (action_code = 'xxx' )" )
MESSAGE( "History " , v-result )
IF v-result <> "" THEN
result = v-result
ELSE
result = DATE( "" , "" , "" )
END

The fetch statement works fine when 'xxx' is present in the history. However, when it is not there it gives today's date which is a problem as today could actually be the real date for the action. What can I do to get blank date?
Regards
Rajeev

rajeev108
Posts: 275
Joined: Sat Feb 11, 2012 9:17 am
Has thanked: 9 times
Been thanked: 2 times

Re: History Date

Post by rajeev108 » Wed Dec 05, 2012 12:08 pm

I could not get any comprehensive documentaion on FETCH statement from Eclipse. If someone has anything regarding this particular statement which they can share then I would appreciate it having a copy.
Regards
Rajeev

rajeev108
Posts: 275
Joined: Sat Feb 11, 2012 9:17 am
Has thanked: 9 times
Been thanked: 2 times

Re: History Date

Post by rajeev108 » Wed Dec 05, 2012 1:04 pm

I have solved the above problem by doing a fetch count after the first statement. If count is zero then I know today's date is Proclaim generated.
Regards
Rajeev

Enigma
Posts: 37
Joined: Mon Mar 04, 2019 1:01 pm
Has thanked: 3 times
Been thanked: 4 times

Re: History Date

Post by Enigma » Wed May 29, 2019 4:36 pm

This is the vital piece of the puzzle I was missing for a Fetch report. Thank you Rajeev!

In combination with your Count to identify the 'blanks' I was then able to result those with a placeholder date to render it redundant in a report.

Thank you!

Post Reply