# 옵션

옵션이란, 선택지나 구분 값을 말해요. 앱을 만들면서 선택지가 필요한 순간엔 언제나 '옵션 설정'에서 등록한 옵션을 불러와서 보여줄 수 있어요.&#x20;

옵션을 등록하고, 등록한 옵션을 관리자 웹과 앱에서 보여지도록 사용하는 방법을 소개해 드릴게요.

<div align="left"><figure><img src="/files/3ONPx7Zsn9Gky9HKX4WZ" alt="" width="375"><figcaption></figcaption></figure></div>

1. 옵션 등록하기

관리자 웹 ➡︎ 옵션 설정 ➡︎ 등록 버튼 ➡︎ 옵션 ID 및 옵션명, 옵션 코드 입력 ➡︎ 저장

<div align="left"><figure><img src="/files/tq46hkeJCamMyZZzzOoL" alt="" width="563"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/vilQA5lRoVONAnifnLQR" alt="" width="364"><figcaption></figcaption></figure></div>

2. 옵션 사용하기

옵션은 주로 드롭다운 선택, 단일 항목 선택 등과 같은 '선택 블록'과 사용해요.

* 운영 모드 ➡︎ 관리자 웹에서 옵션(선택지)항목 만들기

선택지를 골랐을 때, 선택에 대한 값이 데이터로 저장될 수 있도록 데이터의 집, 항목을 먼저 만들어 줄게요.

운영 모드 ➡︎ 좌측 메뉴바에서 원하는 메뉴 선택 ➡︎ 우측 상단의 설정 버튼 ➡︎ +항목 추가 ➡︎ 선택 모음 ➡︎ 블록 선택 ➡︎ 항목 ID, 항목명, 옵션 ID 입력 ➡︎ 저장

<div align="left"><figure><img src="/files/cvVSD4ZKTWn7J96eSS0e" alt="" width="563"><figcaption></figcaption></figure></div>

옵션 ID를 연결한 항목을 추가하면 관리자 웹에서 데이터 등록 시, 옵션을 선택할 수 있는 칸이 생성돼요.

<div align="left"><figure><img src="/files/ETyV8ADpV2MLmxGSMoKj" alt="" width="375"><figcaption></figcaption></figure></div>

* 앱 설정에서 사용하기

등록한 옵션을 앱 화면에서 보여주기 위해, 블록에 옵션 ID와 항목 ID를 연결해 줄게요.&#x20;

관리자 웹 ➡︎ 앱 설정 ➡︎ 좌측 탭에서 원하는 탭 선택 ➡︎ 화면 선택 ➡︎ '선택 블록' 추가 후, 미리 등록해놓은 옵션을 선택할 수 있어요.

<figure><img src="/files/aMbWkxExaEfmcCromIyS" alt=""><figcaption></figcaption></figure>

\* '항목 ID' 입력을 통해 관리자 웹에 등록된 데이터를 앱 화면에서 보여줄 수 있어요.

관리자 웹에서 항목 추가 시 설정한 항목 ID를,  앱 설정 ➡︎ 좌측 탭에서 원하는 탭 선택 ➡︎ 화면 선택 ➡︎ '선택 블록' 추가 후  블록의 '항목 ID'에 입력해 주세요.&#x20;

2024.03.05 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/4/option-settings.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.
