The doctrine of double effect (DDE) is a long studied ethical principle that governs whether taking actions that have both positive and negative effects is permissible. However, it does not fully account taking actions in certain moral dilemmas. The doctrine of triple effect (DTE) can be employed in some of these dilemmas allowing for a separation of principally intending something to happen and merely foreseeing an effect that will happen. This allows us to pursue actions that we may foresee a negative effect being a result of so long as the negative effect is not our primary intention, whereas within the DDE, such an action would not be found permissible. We briefly present the DTE, and using a first-order modal logic, the deontic cognitive event calculus, develop a formalization of it. We end with giving a proof sketch of a situation where the DTE can be applied to while the DDE cannot and comment on future work.