Sets the list of available status choices for users to assign to Comments objects they create in the information catalog using the Information Catalog Manager interface. For example, status choices might be: Open, Pending, Action required, and Closed.
Authorization
Administrator; user (FLG_ACTION_GET only)
Syntax
APIRET APIENTRY FLGManageCommentStatus( FLGOPTIONS Action, FLGHEADERAREA * pStatusStruct, PFLGHEADERAREA * ppStatusStruct, PFLGEXTCODE pExtCode ); |
Parameters
See Appendix D, Information Catalog Manager reason codes for an explanation of the returned reason codes.
Usage
Each time you call FLGManageCommentStatus, you must include the entire 10-entry definition area and corresponding 10 entries in the object area. Use zeros for status areas that you want to leave blank (see Figure 119).
Freeing memory allocated for an output structure
If FLGManageCommentStatus returned data in the output structure, you must save the data returned in the output structure and then call FLGFreeMem (see FLGFreeMem). Do not use other methods, for example, C language instructions, to free memory.
Controlling updates to your information catalog
To keep your program as synchronized as possible with your information catalog, you should include a call to FLGCommit (see FLGCommit) after FLGManageCommentStatus completes successfully. If FLGManageCommentStatus does not complete successfully, include a call to FLGRollback (see FLGRollback).
This sample code retrieves the status structure. Figure 118 shows the C language code required to issue the FLGManageCommentStatus call.
Figure 118. Sample C language call to FLGManageCommentStatus
APIRET rc; // reason code for API
FLGOPTIONS Action=0;
PFLGHEADERAREA pStatusStruct;
FLGEXTCODE xc=0; // extended code
.
. /* */
.
Action= Action | FLG_ACTION_GET; //set get option
rc = FLGManageCommentStatus (Action,
NULL,
&pStatusStruct,
&xc);
Figure 119 shows the output structure for the FLGManageCommentStatus call in Figure 118.
Figure 119. Sample output structure for FLGManageCommentStatus
This sample code updates the status structure with an additional status field. Figure 120 shows the C language code required to issue the FLGManageCommentStatus call.
Figure 120. Sample C language call to FLGManageCommentStatus
APIRET rc; // reason code for API
FLGOPTIONS Action=0;
PFLGHEADERAREA pStatusStruct;
FLGEXTCODE xc=0; // extended code
.
. /* */
.
Action= Action | FLG_ACTION_UPDATE; //update option
rc = FLGManageCommentStatus (Action,
pStatusStruct,
NULL,
&xc);
Figure 121 shows the input structure for the FLGManageCommentStatus call in Figure 120.
Figure 121. Sample input structure for FLGManageCommentStatus