# How do I make certain items in my database link to a dynamic page based on if they are the reference for another item's field?

**URL:** <https://forum.wixstudio.com/t/how-do-i-make-certain-items-in-my-database-link-to-a-dynamic-page-based-on-if-they-are-the-reference-for-another-items-field/6785>\
**Category:** Ask the community\
**Tags:** question, code, wix-stores\
**Created:** [March 18, 2021, 10:57pm UTC](https://forum.wixstudio.com/t/how-do-i-make-certain-items-in-my-database-link-to-a-dynamic-page-based-on-if-they-are-the-reference-for-another-items-field/6785 "2021-03-18T22:57:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![321abigail](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/321abigail/32/26391_2.png) [@321abigail](https://forum.wixstudio.com/u/321abigail)\
**Post date:** [March 18, 2021, 10:57pm UTC](https://forum.wixstudio.com/t/how-do-i-make-certain-items-in-my-database-link-to-a-dynamic-page-based-on-if-they-are-the-reference-for-another-items-field/6785/1 "2021-03-18T22:57:20Z")

</div>

Hello! I am working on a website focusing on improving accessibility in the community. My site uses a database of local businesses to inform users with mobility issues about the businesses’ varying levels of accessibility.

I have run into a problem while trying to create a link for buttons on a repeater that lists all the available businesses. I want the buttons (#button1 and #businessName) to check if the business has any child businesses (for example a mall would be the parent business and its children would be the stores within it). If the business has child businesses/sub-businesses, the button will navigate the user to a dynamic subBusinesses page instead of the normal businesses page.  
I have created a reference field in my Businesses database titled parent, and have made 3 tester child businesses that reference their common parent.

I believe I can do this using the utils.checkLink() method, but I have not been able to find information on how to use the checkLink() function. How does this function work? And is there a better way to accomplish my goal?

 ![](https://us1.discourse-cdn.com/wix/original/3X/2/e/2e81a06abac31dd69acaa6d45f45d1997d01f0b7.png)
