Getting an odd error when I set the action of this button to:
ModifyRows(Filter(tblTasks, Status=“Doing” AND [Assigned To]=User() AND Deadline.IsNotBlank()), Deadline, Deadline+1)
Essentially, I want to find the deadlines that fit this criteria and bump them a day for procrastination. When I click the button, my date field turns into this:
Looks like an array of the table that underlies the view, as if the 1 is being added before the filter is applied.
Any ideas?
Best,
Sam
You get an array because your last value is specifying the whole deadline column. If you add this row deadline + 1 it should work better.
Whenever you want to change value for a row (or many rows), add thisrow to get the actual row.
But this is a button outside the table so there’s no thisRow reference available there.
I think there are two approaches to this at least. The first one is to add an extra column where you convert the deadline date first to the number using ToNumber() and then adding 1, then converting back to date format inside the button. The second one is to add a button type column and then you’ve got thisRow reference there, then the next step is to specify the main button action as “Push buttons”. But I didn’t test that yet, just a though.
Edit: I tested that. The first idea was the silly one for the same reason @tomavatars mentioned.
The second one works and it’s very simple so I probably go with that.
You’re right. The second option is good.
You could also use FormulaMap in the button action like : modify.filter.formulamap(currentvalue+1)
It’s not the right formula, but you get the idea.
FormulaMap would spit an array too. So I think without some sophisticated logic inside and some outside of the formula it will not work. It’s probably possible but it’s too complicated to be worth it. But the idea is nice.
Thanks @Kris_Murawski and @tomavatars. I will try your suggestions and report back with which was the best fit.
That works perfectly. The button column also offers added granular control, too.
Here are the results for the curious:
1 Like