New here but after a day of tinkering and hours of reading and watching tutorials I feel like I’m missing something. I’m trying to create a more robust workout tracker, that after filling out the sheet records the data into the ‘Logs’. Currently Coda puts the information as a list or array into a single cell, but I want each item or data point to be in it’s own cell. I’ve gotten around it for now by making everything a bulleted list so it’s a bit readable but doesn’t help in furthering the doc. Is there a better way to achieve this?
At first glance, my thought is to just use a table and a view instead of the buttons and trying to carry over to a separate table. I had created a pay tracker that needed new values every day so I setup an automation to add the rows I needed with the date, then a view that only showed the rows equal to Today(). So I had a simple content entry view, then the main table on another page showed all the data.
It just isn’t making sense to me why this formula needs to be so complicated.
Once I have that button working to just get a single value instead of the entire list then We’ll be good and I can put it into the automation as you suggested so I won’t have to touch the thing again.
I think what you’re looking to do is extra work here and using views will take out the complexity. If you do need the entry table and the log table to be separate though, I would create a new column in the table where you enter your workout data and make it a “Button” type.
Then for that column button, I would use a formula like this…
You’ll need to add the rest of your columns for the button to update, but this shows the idea.
This formula uses RunActions() which allows you to create a comma separated list of actions for a button to run. So it’s like pushing two buttons instead of one. The first action will add the row and whatever values you include to the new table. The second action will delete the current row. So you can transfer the row to your “Workout History”, then delete it from your entry table.
Then you can create a canvas button that simply pushes the column button. So it will push the button for each row in your table to move all rows over and delete them after they’re moved.
@BenLee , Thanks for the replies. Appreciate you taking a look.
I think you may be making an assumption though. What I’ve done is taken your suggestion of making a view of ‘workout history’ and making that the entry on the main page. What I’m currently doing is having a ‘test button’ before I turn it into the automated function so I can make sure it’s working correctly easier instead of clicking ‘test automation’ and stop and such.
This is my current formula that is adding the proper amount of rows (finally) the issue now is why am I getting a list of values, instead of just the value of the current row being iterated on in sequence.
I’m assuming I have to use something that gets the value of the row in question, I just don’t know what that something is whether it’s thisRow or currentValue or something. I’ve Updated the coda attached so you should be able to see what’s happening live. I’m no longer trying to move values entered from one table to another, I’m simply using a view that filters the date to today() as you suggested.
You can actually use a Filter() formula here to filter your table and return the rows instead. Then the FormulaMap() will run through the actions on the rows instead of on a number.
Movements.Filter(Workout.Contains("A")) A trick I use here is simply adding this formula to it’s own column or in the canvas then see what it returns. You should get a list of row “capsules” that you can hover over and see all the row info.
Then in your FormulaMap and AddRow, anytime you’re referring to a value that you need from the current row being processed, you should use CurrentValue() and anytime you need a value returned that is from that row only, you should use thisRow().
The list of rows being run through the FormulaMap is already from the [Movements] table and it’s the current row being processed that we want the value for.
Thank you so much Ben! Your solutions not only worked perfectly, but allowed me to understand where I was going wrong.
I was always trying to do exercises.currentValue not realizing what the currentValue was referring to. Excellent explanations and thank you for such detailed replies. Appreciate your effort and patience!