Darren, I really appreciate you putting this together for me.
I will examine and try to understand what’s going on. I have downloaded the template.
One observation I do have at the moment is that when I put start / end times in, they seem to disspear and write to the table even if I haven’t pressed submit.
That’s the way a custom form works - values are written to user specific columns first, and then used to add a row when the form is submitted.
However, the disappearing thing shouldn’t be happening. Like I’ve mentioned a couple of times, the solution I offered assumes that the form will always be submitted by a signed in user, so it’s essential that you do the following:
- make sure User Profiles are correctly configured
- have at least one row in the Users table
- be “viewing as” that user when interacting with the form
If you haven’t done the above, it won’t work properly.
I am vieweing the form as a signed in user. You had already created a user in the table. I am viewieng as that user (i.e. you).
Okay, did you check the user profiles configuration?
Actually, I just had another look and I can replicate the behaviour that you’re seeing.
I know what’s causing that - it’s the 10 second Glide clock update cycle.
Let me see if I can throw in a fix for that and I’ll re-publish the template.
@jejones - I’ve fixed that issue, here is an updated template link:
In this version, you’ll see a column in the Helper table called “StartTimeAsDate”. You will need to reconfigure that column and add your own UTC offset to get the correct starting time, see below:
Thank you. I hope you’re ready for some more questions.
Can I ask you fixed the 10 second time cycle?
In the original version I used a math column to calculate the Start Time (7am) based on the current date and time. That works fine, except that the current date and time changes every 10 seconds, and every time that happens the absolute values that the choice components reference change. Which invalidates any selection that’s already been made.
To address that, I changed the math formula to instead return an integer representation of the Start Time rounded to the nearest hour, and then converted that back to a date/time value with a Text to Date column. Because that base value will now only change once per hour, the likelihood of that happening whilst the form is being used is much lower. It’s still possible - for example, if you open the form at one minute to the hour, select a start time value and then wait, you should see it disappear as the hour ticks over. But I think that’s probably acceptable, no?
I am getting my head around what is happening here however, can you tell me how you added these form elements to the table? I can see this is where the custom form comes from but I’m still not sure how this is added in the layout section.
Those are the columns that the form inputs write to. You can think of them as temporary storage for the selected values while the form is in use. If you open the form in the layout, then examine the components, you’ll see that each is targeted at one of those 3 columns.
I guessed that’s what it was but what I can’t get my head around is how you create the form elements within the table to then use on the front end.
I know I’m being stupid here.
My only experience with forms is using the forms container and I think whay you’re doing here is completely different.
They are not form elements, they are columns. Is it the word form above them that’s throwing you off? That’s just a convenient way to group columns together by the way you name them. If you edit one of them, you’ll see how that works.
I think I undertstand now. It was the word that was confusing me. I didn’t realise you could name columns that way.
I think I’ve got it now. I’m going to create a very simple form and see if I can transfer the inputs to another table to see if my understanding is correct.
Again, thanks for the tuition and the template. This has been invaluable.
svTimeHelper
: this is a Single Value column that addresses the first row in the Helper Table. Because it’s in the User Profiles table, it allows you to access that row from anywhere in the App. If you examine the saved action on the Add button, you will see how it is used.- the other two columns are default values for both the starting time (7 = 7am), and the time interval (15 mins). These are used in the math formulas in the helper table. They could be hard coded in those formulas, but defining them as “constants” in the User Profile allows them to be easily changed. For example, if you decided you want to start at 8am instead of 7am, all you need to do is change that 7 to an 8.
Thank you. I’m just trying to incoporate the tables and associated logic into the app I had already created so trying to understand it all.
No problems. Feel free to continue to ask questions, I don’t mind.
I assume the contacts and companies tables are superfluous?
Yes. I started with a default App and didn’t bother to remove them.
I would like to say a massive thanks to @Darren_Murphy for all the help he has provided to me over the last few days.
I have not only learned a lot but Darren has produced some very clever solutions to problems I was having.
Thank you so much.