Hi, very new to coda but enjoying the learning.
I have a button that I want to AddRow() one row to a table, modify a value on that row and also add one row to a related table and modify a value on that new row and then lastly use the OpenRow() to open that first table with a specific table view not used by the master table.
I have had success in creating a button that AddRow’s & modfies all the required rows but I’m not sure how to get the OpenRow() to open the view of the row created first, as gives me: " * 2 rows added
- Layout specified is not valid for the row". And this is because it is pointing to the table of the second row that was created.
Formula
RunActions(
AddRow(
[BASE Tasks],
[BASE Tasks].[Quick description], "New Shop Drawing Review",
[BASE Tasks].[Task type], "Shop Drawing Review"
).WithName(newTask,
AddRow(
[BASE Update Log],
[BASE Update Log].Task, newTask,
[BASE Update Log].Comment, "None"
).WithName(newTask2,
RunActions(
OpenRow(newTask2,[BASE Tasks],"modal")
)
)
)
)
I can also get it to create & modify all required rows as per above AND open the correct table view with openRow() but it creates an additional second unwanted row in the first table and this is the row it opens with OpenRow():
RunActions(
AddRow(
[BASE Tasks],
[BASE Tasks].[Quick description], "New Shop Drawing Review",
[BASE Tasks].[Task type],"Shop Drawing Review"
).WithName(newTask,
RunActions(
AddRow(
[BASE Update Log],
[BASE Update Log].Task,newTask,[BASE Update Log].Comment, "None"
),
OpenRow(newTask,[Shop drawing reviews],"modal")
)
)
)
This is what I hope the user ends up presented with:
Any suggestions would be much appreciated. And note I am a very green formula writer and not very familiar with coding.
Thanks in advance!