# A new set up

In my first blog I showed the table below. I used it to create a planning based on the weekdays and even / odd week numbers the children stay with their parents. Although it works, I had to review the set up to integrate the element time.

To element time is about the moment the children move from one parent to the other parent. However In daily practice such a transfer is often after school. Since not every weekday that is not a holiday is a normal school day, it happens that children have a day off at school. Since the children go to school most of the time, the factual transfer for the parents feels the one in the morning. And that understanding you see reflected in the table above, it is based on school going days. When it comes to planning, we look better at the arrangements made instead of assuming ‘they always go to school’. Certainly during the Covid period it became clear that going to school is not so evident as previously expected.

Below the reworked table. We have 14 lines distributed over two weeks (odd & even) and the two parents. The moment the children move from one parent to another (or are transported) you see on the right hand.

The column that shows the ‘evening’ is a lookUp, it relates in my example to:

As said before, this logic covers the odd and even weeks as well deals with the weekday logic. In the first and display column ‘Name’ I created a function that shows the logic for the parents. In this scenario all kids are always together.

# Two or three shifts during one day

There is one more complication. It concerns a double shift during the day. A double shift happens when one parent (let’s assume the mother) brings the children to the father in the morning and picks it up at night. As such the children see both parents on the same day.

The solution I propose makes use of buttons, while our starting point remains the table I showed. We use a button to duplicate the day the double shift applies.

Since the GroupIndex is based on the week 1 or 2 and on the day number (which is a chained value due to my logic that permits me to set the language on Dutch or French) we have values between 1.1 and 2.7.

The duplicated row has the same GroupIndex value as the source row, as you see below because it is the same day in the same week and via a table sorting I made sure the duplicated row showed up nicely below the source row.

The next step is to have a summary of this complex configuration.

Although I believe it is often not in the interest of the children to move them around multiple times per day, it happens that there is no other way for the parents. I created a solution that allows for up to three transfers per day. In theory there are 4, but 3 already feels like a lot.

Below the outcome in case you have two moments. The first two lines give the same result and I will apply `.First()` in my table DB Planning to get only one value for Mondays in Odd weeks.

In rare occasions it might happen you have three transfers. The logic looks very much like the previous one and once I have to develop a 4th solution, it will look very much the same as this third variation.

## Next step: the distribution of the children over the parents

I promised to come back to situation that the children do not stay together. As you will see in my next blog, this becomes complicated. Complicated means that you easily get confused and make mistakes in your set up.

A preview of that complexity below. The use case is a situation that the boys go to school on Monday morning, while the youngest (girl) is during the day with the mother. From a technical point of view:

• the boys do not have a transfer
• the boys are together
• only the girl has two transfers (leaving & pick-up)

An other promise I made was showing you the content of the buttons I use to generate the various base tables. Both promises mean that I am not yet ready with blogging on how to plan a divorce in Coda.

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

Coda comes with a set of building blocksーlike pages for infinite depth, tables that talk to each other, and buttons that take action inside or outside your docーso anyone can make a doc as powerful as an app (source).

Not to forget: the Coda Community provides great insights for free once you add a sample doc.

If you enjoyed this read and would like to get more Coda related content, please consider a Medium membership. It is it only \$5 a month, and you’ll have access to every article ever published on Medium. If you sign up using my referral link, I’ll earn a small commission.

--

--

## More from Christiaan Huizer

I use 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.

## Christiaan Huizer

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