cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

get approvers with trigger

MicheleGiudici
2-Explorer

get approvers with trigger

hi all,
i'm writing a post release level change to get the two approvers that
vote for the change of a release level of a piv and the date of both
approvation.

using PDMReviewHistoryGetLastModificationStamp i can get the last
approver, but i'm not able to find the first approver.


the portion of code that i wrote and work for the last approver is:

for ( i=0; i<argc; i++=" )=" {<br="/> part = *((HPDMPROMOTIONPARTICIPANT *)argv[i]);

err = PDMPromotionParticipantGetPIV( part, &piv );

err = PDMPromotionParticipantGetPromotionForm( part, &pf );

// get REVIEW HISTORY
err = PDMPromotionFormGetReviewHistory ( pf, &revisionHistoryCursor );

for ( PDMCursorGetNext( revisionHistoryCursor, &ReviewHistoryHandle );
!PDM_HANDLE_IS_NULL( ReviewHistoryHandle );
PDMCursorGetNext( revisionHistoryCursor, &ReviewHistoryHandle ))
{
// get the last modification stamp of REVIEW HISTORY
err = PDMReviewHistoryGetLastModificationStamp(
ReviewHistoryHandle, &dataOraReviewHistory, &reviewer );

// reviewer is the last approver

// get date of last modification
err = PDMDateTimeGetInfo ( dataOraReviewHistory, &DateTimeInfo );
PDM_STATUS(funcName, "PDMDateTimeGetInfo()",err);
}
err = PDMCursorDelete ( revisionHistoryCursor );
PDM_STATUS(funcName, "PDMCursorDelete()",err);

any help is appreciated.

thanks,

michele giudici



[]


Cad.I.Tech. - Cad Integration Technology s.r.l.

Via Montevideo 7/11, 16129 Genova (Italy)
2 REPLIES 2

I have never tried to get this data but I would try this:



PDMReviewHistoryGetOriginalVoter

(



HPDMREVIEWHISTORY ReviewHistoryHandle





/* (In)



The handle to the review history



*/



HPDMUSER* UserHandle





/* (Out)



The handle to the original voter



*/





Patrick Williams | Sr. Application Engineer | CAM Systems | Steelcase
Inc. | 616.698.4078






thanks for the suggestion,
i will tray and get a feedback.
michele

>I have never tried to get this data but I would try this:
>
>PDMReviewHistoryGetOriginalVoter
>(
>
>HPDMREVIEWHISTORY ReviewHistoryHandle
>
>
>/* (In)
>
>The handle to the review history
>
>*/
>
>HPDMUSER* UserHandle
>
>
>/* (Out)
>
>The handle to the original voter
>
>*/
>
>
>Patrick Williams | Sr. Application Engineer | CAM Systems |
>Steelcase Inc. | 616.698.4078
>
>[]
>
>
>
>----------
Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags