Is thisRow no longer available?

Hi,

I’m new to code and I’ve bee watching some of the videos in youtube. In one of the videos, “thisRow” is used exactly the same way I’m trying to, but when typing:

AddRow([Recurring Tasks],[Recurring Tasks].Name, thisRow.Name...

the “thisRow” part is not recognized or offered. Was that option removed?.

Your help will be greatly appreciated.

I’m presuming your example is for a button which adds a row. in this case thisRow is available if your button is a column in a table, but if it is a button that lives somewhere else in your document outside of a table then you cannot use thisRow.

in a table (which also needs to have a name column) the formula would look something like

AddRow([Recurring Tasks], [Recurring Tasks].Name, thisRow.Name)

if it is outside of a table you would get the name from elsewhere or use a placeholder name such as:

AddRow([Recurring Tasks], [Recurring Tasks].Name, "my name")

1 Like

Hi,

Thanks for your response, that makes complete sense. The button is outside the table, so that’s why I can’t see thisRow.

What I’m trying to do is to make that button duplicate rows in the table that have a checkbox checked in one of their columns. I’ve been reading the documentation and I think I would have to use a FormulaMap, but I haven’t had time to look into it.

Hi @Lenin_Ramirez-Sanchez !

Maybe you can just use a column, type “Button”, in your table. You have the “Duplicate row” function. You can use it with ThisRow and in the “Disable if” you add the fact that button is disabled if the chekbox is false.

Then, outside your table you just use the external button to push the buttons of the column and it will only push the ones that are not disabled.

I didn’t try this but I did something very similar in one of my docs so I’m almost sure it works :slight_smile: Let me know and do not hesitate to share your doc if I didn’t understand your need !

Hey, @Lenin_Ramirez-Sanchez ,

This canvas button formula below duplicates every row that the checkbox is ticked. If you have more columns in this table, you need to add them to the formula. If you can always clear the checkboxs using another action inside RunActions().

Table.Filter(CurrentValue.Checkbox = true)
  .FormulaMap(
    Table
      .AddRow(
        Table.Name,
        CurrentValue.Name,
        Table.[Column 2],
        CurrentValue.[Column 2]
      )
  )

@Breno_Nunes thanks for your help, it worked perfectly!

@Aurelie_PUREUR2 your solution is very clever, I’ll try that one out too.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.