Help between Notion users

It's free & easy

Receive points, vote and give the solution

1vote

# Check if value in field exists in a list

Hi all!

Imagine you are scouting for a new apartment in a new town, and fill a Notion DB with the details of apartments you are interested in: Owner name, Address, etc.

But! Not everyone in this new town is nice - some of them are horrible flat owners and you wish to avoid them. You are lucky enough to have a list of bad owners which you have, conveniently, also kept in Notion.

Could you build into your apartment database some function that will turn on if you fill in a name that exists in the naughty list?

Should look something like this:

Evil name list: Bill, Bob, Karen

Notion DB:

Phil 7 Short st -
Joe 12 Short st -
Jane 4th avenue -
Karen 27 Short st XXX

1vote

polle Points27750

You can do a simple check using a Notion formula.

Create a new Notion property as formula and add the following.

``if(prop("Name") == "Karen" or prop("Name") == "Joe", "run", "stay")``

That will check the names and will show "run" for Karen or Joe and stay for everyone else.

You can extend the or in the formula with all the bad owners.

Hope that helps.

1vote

### BeepBoop commented Aug 3

Awesome solution, thanks!

Is there a way you know of to modify this in case that list includes ten names? Or would it have to be a long list of Or statements?

0vote

### polle commented Aug 3

You have to add the ten names (or the needed ones) to the formula. If you consider the question solved, please select the answer to mark it. :)

0vote

### BeepBoop commented Aug 3

If that's the only way then it is absolutely solved - thanks a lot @polle !

0vote

### polle commented Aug 3

You're welcome :)

Notion formulas run per row and that is why you need to include everything, so it checks the Name row itself to see if one of the names you included is there.