SaveWorkData()

This code sample describes how to update the information stored in the database tables for the Table Values data type. This script calls the UpdateTableValues() script which then calls the DeleteWorkData() script (to remove the previous information) and the SaveTableValues() script (to add the new information).

		Function Boolean SaveWorkData( \
			Object 		prgCtx, \
			WAPIWORK 	work, \
			Record 		taskRec, \
			Dynamic 	data )
			
			Boolean 	success
			Record 		r
			Object 		session = prgCtx.WSession()
			
			success = session.StartTrans()

			//Call the UpdateTableValues() script.

		if ( success )
			success = .UpdateTableValues( prgCtx, data )
		if ( !session.EndTrans( success ) )
			success = False
		end
	end
	
	return( success )
end