I’m new in coda.io. I’m trying to create a reservation system for bookinglaptops . The teacher chooses a date and lesson in the form and the form should show the maximum number of available devices (32) to rent. He then selects the number of devices and submits the form.
Everything works in coda.io, but the calculation for the number of available devices does not work in the published form.
Here link doc: link
Out coda - published form:
Can you help me?
Hi @Zdenek_Kybl , thanks for reaching out! Would you mind sharing your doc with the Community by making it public so we can take a closer look at what you’ve already built?
If you’re unable to share your full doc due to security reasons, we totally understand! In this case, we ask that you please set up a demo doc that you’re able to share publicly. This can be a scaled-down copy of the doc you’re working on or just an example doc displaying the issues you’re encountering.
Afterward, please reply with the link to your doc so we can take a look for you.
It will always read the full amount as they are filling the form in because of your formula in the table. You’ll need to move the total amount of inventory to the section of the formula after they have chosen the date and time they are looking for. This will hopefully tie it to the date and then allow you to deduct what is already being used for that day.
I’m sorry, I don’t understand what you mean.
No problem. You want to add a column with your daily total in each row. From there, as people sign up you can group the data and then run down the full number of available units. And you’ll want the form to look at the calculated total left for the day, rather than have it set up to look at a formula that will have to auto calculate each time. So you’ll want to make sure that you have the value for new rows set to 32 each time. An you could possibly group the table results by day to check that that formulas are working for you.
That should allow the form to see what is free for the day.
Thank you for the reply, but it’s not working for me.
My formula works in the coda environment, but it doesn’t work in the published form
The user selects a date and the form should display the number of devices available for that day and that class period.
So I always have to filter the previous bookings for that day and lesson and add up the number of facilities booked.
a teacher wants to create a reservation for 06.09.2023 for the third lesson.
The form should then show 17 in the “available devices” field, because teachers have already booked 15 devices for this date.
This works in coda, but not in the published form.
Hello @Zdenek_Kybl ,
What you want to do can’t be done this way: the form that you present to your users doesn’t ‘live’ in your doc, but is a separate entity somewhere on a Coda server. The layout that works in your document is a different story, because it has, unlike you published form, direct access to the data in your document.
I think what you want to do can be done, but requires some extra work. I am not sure the approach Dan proposes is going to work (I tried it real quick but did not succeed). You probably need to make a lookup table in which you store booked devices (or availability), which you will have to build with an automation. I won’t be exactly real time, but it will be close to real time (a few minutes).
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.