# Index and match custom formula

**URL:** <https://community.fibery.io/t/index-and-match-custom-formula/9037>\
**Category:** Get Help\
**Created:** [June 24, 2025, 1:46am UTC](https://community.fibery.io/t/index-and-match-custom-formula/9037 "2025-06-24T01:46:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![J\_Broadway](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/j_broadway/32/12040_2.png) [@J\_Broadway](https://community.fibery.io/u/J_Broadway)\
**Post date:** [June 24, 2025, 1:46am UTC](https://community.fibery.io/t/index-and-match-custom-formula/9037/1 "2025-06-24T01:46:41Z")

</div>

Hello,  
I am trying to create a custom formula takes in a string [myURLString] and searches for it in a database field [myDatabase].URL

If the URL is found then return the [Name] field of the database [myDataBase].Name  
If not found then leave blank.

I am struggling to figure out how to do this. I’ve tried using the AI formula creator and looking through the formula reference guide, but I am not having any luck.

Any help is much appreciated.  
Thank you.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [June 24, 2025, 8:13am UTC](https://community.fibery.io/t/index-and-match-custom-formula/9037/2 "2025-06-24T08:13:58Z")

</div>

It sounds like you could use [auto-linking](https://the.fibery.io/@public/User_Guide/Guide/Auto-linking-(Set-Relations-Automatically)-50) to connect entities from two different databases, and once that’s done, you can use formulas/lookups to get whatever fields you like.

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [June 24, 2025, 6:29pm UTC](https://community.fibery.io/t/index-and-match-custom-formula/9037/3 "2025-06-24T18:29:02Z")

</div>

@J_Broadway  
When you say _a formula that “takes in a string”_,  
do you mean search for the value of a _text field_?  
If so, you should be able to write a formula like:

```auto
If( [myDatabase].Filter( [URL] = [field_to_match] ).Count() > 0,
    [myDatabase].Filter( [URL] = [field_to_match] ).Sort().First().Name,
    ""
)
```
