Button to increase values based on a formula

I have a table with a date column. I wish to add X amount of days to this column where X is the result of a calculation in another table by clicking a button.

I can’t seem to get it to work, the thisRow function doesn’t seem to be available (I’m referencing the main table and not a view in the button). Instead it adds the number of days to all rows then inserts all those values into a cell.

What do I need to do to get current value or thisRow to just add X number of days to each row individually?

Dear @Jonathan_Richardson,

It’s always appreciated when users share a dummy sample doc with some info on the expected outcome/behavior :thinking:

Hello @Jonathan_Richardson
As I understand your button is outside the table you want to change the date on, in case thisRow isn’t available because your button is not in a row.
What you can do, is add a new column as a button that adds days to a date using thisRow, then a button outside the table that presses all the buttons of the column inside the table, or if you want to change only certain dates and not all of them you can apply a filter to get only the rows you want to change and press the button only in those rows.

As @Jean_Pierre_Traets said, it’s better to share a dummy doc, because sometimes it can be a simple parameter in a formula or a complete change of schema, and we can only guess by the info it’s given.

Thanks @Saul_Garcia and @Jean_Pierre_Traets I have looked at the button column option and that sounds like a workaround.

In the mean time I’ve created a dummy document here in comment mode, not sure if best to share as editable or to allow a copy so let me know if I should change permissions.

It will change the table in the previous page (Project tables examples), I moved this to its own sub-page as it was getting busy.

Hello @Jonathan_Richardson!
In this case you would have to use formula map to add the value to each row.
image

[Project table].FormulaMap(
CurrentValue.ModifyRows(
[Start Date],
[Start Date]+[Date planning table].[Days to add].First()
)
)

Whit the FormulaMap() formula you do the calculation for each row in the project table, now inside you use the CurrentValue, that in this case, is each row, to modify its values with the new date.

1 Like

Thank you, that makes sense, I didn’t think about using formula map