> For the complete documentation index, see [llms.txt](https://docs.ohmyapp.io/main/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ohmyapp.io/main/guide/develop_app/command-execute-function/create-logic/event-option.md).

# If When

## **If When**이란?

* 설정한 로직에서 필터링이 필요한 경우 [조건](/main/guide/dictionary/condition.md)을 만들기 위해 사용해요.
* 발생하는 사건이 특정한 조건에 부합할 때만 로직을 실행하도록 설정할 수 있어요.
* 특정 시간 때 마다 작동하는 로직이 필요할 때 사용해요.
* 데이터 항목과 값을 비교하는 단순한 조건을 설정해요.
* [API 요청](/main/guide/develop_app/command-execute-function/create-logic/conditions/detailed-processing-conditions/api.md), [예외 처리](/main/guide/develop_app/command-execute-function/create-logic/conditions/detailed-processing-conditions/if.md) 등 복잡한 조건은 [New data query](/main/guide/develop_app/command-execute-function/create-logic/conditions/detailed-processing-conditions.md)로 설정할 수 있어요.

**예시**

> 데이터 로그에 등록된 데이터가 좋아요인 경우일 때 로직 실행
>
> 데이터의 종류가 댓글일 때 로직 실행
>
> 피드 작성자와 댓글 작성자가 같지 않을 때 로직 실행

> \#이벤트 옵션, #로직, #필터링, #조건, #비교 표현식

2024.01.03 Jinny
