# データベースの内容によって表示を切り替える方法

**URL:** <https://www.nocode-faq.com/t/topic/2423>\
**Category:** bubble\
**Created:** [2021 年 12 月 9 日午後 2:05 UTC](https://www.nocode-faq.com/t/topic/2423 "2021-12-09T14:05:18Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jansnap](https://sea2.discourse-cdn.com/flex020/user_avatar/www.nocode-faq.com/jansnap/32/6599_2.png) [@jansnap](https://www.nocode-faq.com/u/jansnap)\
**Post date:** [2021 年 12 月 10 日午前 1:55 UTC](https://www.nocode-faq.com/t/topic/2423/2 "2021-12-10T01:55:05Z")

</div>

[Bubble 投稿に対するコメント送信機能について](https://www.nocode-faq.com/t/topic/2416) の続きですね。

> CommentテーブルにBookテーブルを紐づけることで解決できました。

とのことなので、  
Conditional の設定を、「Current User がこの本に対してコメントした数が0以下なら」としてはどうでしょう？  
具体的には、「Do a search for」を使って、  
「Search for Comment」でCommentテーブルのレコードを探し、「:count \<= 0」で件数を調べます。  
Commentテーブルのレコードを探す時の絞り込み条件には「Comment\_User = Current User」と「CommentBook = Current Page Book」を指定します。

---

_[View the full topic](https://www.nocode-faq.com/t/topic/2423)._
