Photo by Jens Kreuter on Unsplash

How to find a free room using Coda?

Date based filters combined with capacity

In my previous blog I wrote about setting up a table with sample information. In this blog we explore how you can filter out dates that match the criteria and we show how to find a room that fits your single search criteria: people.

The Date Picker

We relate the date picker to the table view using the table option ‘Filter’. This gives us a quick overview of the rooms booked. We start with bringing in all the rooms. Instead of using currentvalue.IsNotBlank() we apply the column Name.

The why you see in the screenshot below. The CurrentValue is not blank, even when the eye tells you it is. This was a bit of a surprise to me.

The second step is to only show the rooms that are not in the list of Rooms Booked. Below how we can filter out using Contains() and Not()

Filter direct on a Filter

The same result using WithName() to improve the understanding of the formula.

Using WithName() to get the free rooms

With the available rooms in our view we can hide the booked ones and bring in related information like the capacity per room. In our third step we chain to get results.

step 03: chaining in action

Step number 4 is to check if we can find a room that fits the criteria of let’s say a room for 3 people. We get the results by combining a Filter() and a FormulaMap(). The Filter outputs the position of the free room in the list of Free Rooms and the FormulaMap() turns this position into a room.

Formula to find a fitting room

Here you have it: a formula that permits you to find an available room.

I am not an hospitality specialist, but from my own experiences I know that sometimes you are also happy with two rooms if you cannot find one room that fits all. This puzzle we try to solve in our next blog.

I hope you enjoyed this article. If you have questions feel free to reach out. Though this article is for free, my work (including advice) won’t be, but there is always room for a chat to see what can be done. Besides you find my (for free) contributions to the Coda Community and on Twitter

My name is Christiaan and I support SMB with calculations (budgets and planning) and I prefer using Coda to get the job done.

Not to forget: the Coda Community provides great insights for free once you add a sample doc. Paid consulting is often not the way to proceed.

Christiaan on: How to find a free room using Coda?

--

--

--

Christiaan uses Coda mainly for planning & calculations of all sorts. Follow me to learn how to Coda with numbers. I blog at least once per week.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why Choose Apagen for odoo implementation services?

Software Development And SDLC…

How to generate a JWK representing a self-signed certificate

Why such a hype for microservices?

Project Premortem — how to predict and mitigate risk

Why we choose to adopt GraphQL

The Dark Art of Project Estimations

4 ways of using Feature Flags like you actually know what you’re doing!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Christiaan Huizer

Christiaan Huizer

Christiaan uses Coda mainly for planning & calculations of all sorts. Follow me to learn how to Coda with numbers. I blog at least once per week.

More from Medium

How to Coda your Shopify Pack

Old doc, new year: Part III

How to Coda contract management?

How to Coda a Template