# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ohmyapp.io/main/guide/develop_app/command-execute-function/create-logic/event-option.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
