Create/add rows for all possibilities


am trying to create all possible appointment slots but cant seem to piece together whole flow with sequence formula and have tried withname, formula map, for each, helper table :sweat_smile:

end goal is after entering start and end dates, then pressing create availability slot button would add to Appointment Slots table of possible combinations (have filled out manually appointment slots table for desired end result).

Added a playground demo doc below:

any insights/teachings would be greatly appreciated :slight_smile:


Hey @Melanie_Teh

I’ve made a copy of your doc and have updated the [Create Availability Slots] button’s action formula so that it works as you’ve described. I’m not sure what the HLP Availability Slots table is for, nor the BTN Create Slots button on the Availability Schedule table. I’m guessing those were both intended to break the problem down into smaller chunks. I didn’t end up using either of those - everything’s in that big red button.

The button formula does a lot, so it’s quite long. There’s no real way around that! In cases like this, I find it INVALUABLE to use WithName() to give yourself well-named variables to work with. That helps break the problem down a bit, and makes the overall formula a bit easier to read.

The only other trick here is dealing with rows in Availability Schedule that have blank Start Time, End Time or Availability Types columns. Those would break the logic so there’s an If() block that checks those are valid, and IfBlank() run a hidden action formula called _NoOp(). This formula basically “does nothing” so it’s useful in cases like this where you’re looping through valid/invalid rows and don’t want your action to break execution half way through.

Hope it’s easy enough to follow, but if not, feel free to reach out. Here’s my copy of your doc with the updated [Create Availability Slots] button action:


hey @Jono_Bouwmeester

thank you so much! :grin: :grin: :grin:
and also thank you for the time placed into the explanation and theory behind. much appreciated !


You’re welcome, @Melanie_Teh. It was a fun challenge! :wink:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.