> 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/faq/logic/4.md).

# 4. 상점 리뷰 등록 시 기존 상점 리뷰의 총점을 수정하고 싶어요.

1. 관리자 웹 > [로직](/main/guide/faq/logic.md) 설정 > '+'버튼을 클릭해 새로운 로직을 생성해 주세요.&#x20;
2. 아래와 같이 입력해 주세요.&#x20;
   * If When : Data is created
   * Where : storeReview
   * Then : Updated Data

> storeReview는 상점 리뷰를 저장하는 컬렉션이에요.&#x20;

3. Then 아래, To do를 펼쳐 아래와 같이 입력해 주세요.&#x20;
   * Collection for Data Update : store (상점 정보를 저장하는 컬렉션 명(store)을 입력 해주세요.)
   * &#x20;Data Search Condition to Update : "등록된 상점 리뷰가 연결되어 있는 상점 정보"를 찾기 위해 아래 이미지와 같이 작성해 주세요.
   * Number of data to update : "기존 상점 리뷰 총점을 등록된 상점 리뷰를 더한 총점으로 수정"하기 위해 아래이미지와 같이 작성해 주세요.&#x20;

<div align="left"><figure><img src="https://3976660509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDgfvhQgmY9NbRK0Sln7j%2Fuploads%2F1LAkNsoiRwzE5JCPSvYm%2F%E1%84%89%E1%85%B3%E1%84%8F%E1%85%B3%E1%84%85%E1%85%B5%E1%86%AB%E1%84%89%E1%85%A3%E1%86%BA%202024-01-11%20%E1%84%8B%E1%85%A9%E1%84%92%E1%85%AE%207.46.04.png?alt=media&amp;token=533bb799-2e2f-42f6-9eae-d2d1d6d852d1" alt="" width="375"><figcaption></figcaption></figure></div>

> "scoreSum"은 상정 리뷰의 총점이에요.

4. Save 버튼을 클릭 후, 상점 리뷰를 등록하면 기존 상점 리뷰의 총점이 수정돼요.

> \#로직, #로직 설정, #로직 설정하는 방법, #리뷰 등록 시 리뷰 총점 수정하는 방법, #평점 등록 시 평점 총점 수정하는 방법, #리뷰 총점 자동으로 수정되게 하기

2024.01.11 Jinny
