# Updated Data

로직 조건에 맞는 기존 데이터를 모두 수정할 때 사용해요.

ex) 구독권의 구독 상태가 변화할 경우 유저의 구독 상태를 변경하기, 글 작성 시 작성한 유저 정보에 글 작성 수 카운트 올리기 등)

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

**Collection for Data Update :** 수정하려는 데이터를 포함하는 컬렉션 명을 입력해요.

**Data Search Condition to Update :** 수정하려는 데이터를 찾는 검색 조건을 입력해요. 내부의 데이터는 동적 키, 동적 오브젝트 또한 허용돼요.&#x20;

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

> 수정할 데이터가 들어있는 컬렉션에서 \_id가 수정하는 로직을 실행할 \_id인 데이터를 검색해요.

**Data to update :** 데이터를 수정할 때 사용돼요. 데이터에서 해당하는 키 값을 가진 항목 값에 적힌 값으로 변경돼요.&#x20;

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

> 검색 조건에 해당하는 데이터의 "activeStatus"를 "true"로 수정해요.

**Number of data to update :** 데이터의 카운트를 올려 줄 때 사용돼요. 데이터에서 해당하는 키 값을 가진 값이 항목 값에 입력한 값 만큼 올라가요.

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

> 검색 조건에 해당하는 데이터의 "showCount"를 1씩 올려줘요.

> \#데이터 수정하기, #글 작성 수 카운트 올리기, #구독 상태 변경하기, #회원 등급 설정하기, #유저 등급 부여하기, #회원 등급 설정하는 방법

2024.01.09 Jinny

**Modify Existing Data**

This function facilitates making modifications based on the current dataset.

(This also involves tasks like updating a user's subscription status in response to changes and adjusting the count of posts linked to the user's profile when they contribute to the community and more.)

> \#data modification, #post count adjustment, #update subscription status, #assign member ratings, #evaluate users, #configure member ratings

2023.08.11 Song


---

# 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/flow_option/modify-existing-data.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.
