Determine Selected Row

If I use the multiselect feature with a table then the code below works to determine the selected row.

Blockquote
table1.selectRow(0,1);
localStorage.setValue ('minvnumber': table1.selectedRow.data[table1.selectedRow.data.length - 1].Invnbr)

But I only want 1 selection so I am using a Check Box (Check01) in Boolean format so it means checked when Check01 = 1.

How do I write code in the above format to get the pointer on the right row?

Mike

Hi @mdsmith1!

To clarify, you have a standalone checkbox and you'd like to use it select a row in a table? Or you have a checkbox in the table?

Any screenshots you have would be super helpful, thank you! :+1:

Victoria:
I have received help already that if I turn on multi select in the table, that I can retrieve my Invoice Number with

table1.selectRow(0,1);
localStorage.setValue ('minvnumber', table1.selectedRow.data[table1.selectedRow.data.length - 1].Invnbr);

But I can't use this if Multi Select is off. So I have a Checkbox (Check01) handling the Check Marks. Its boolean so Check01 = 1 when checked.

I need code equivalent to the above that will return the Invoice Number by looking at Check01.

I have attached a screen shot.

Mike

Hey Mike!

If multi select is turned off, you can access your column info like:

{{ table1.selectedRow.data.id }}

Is that what you're looking to do?

Victoria:

I know that you are very busy but if I could get the exact code it would really help.

The filter condition is Check01 = 1, and the field is called Invnbr.

What would go between the curly brackets to recover the Invoice Number?

Thanks.

Mike

Happy to help with the exact code! So when you say the filter condition is Check01 = 1, how does this checkbox relate to your table?

The checkbox is called Check01 and its in Boolean mode in the table. (Check01 = 1 when checked)

All I need is to capture the Invoice Number (called Invnbr) as a variable such as @invnbr.

I am sending you a screen shot.

Mike

{{tableLegacy1.selectedRow.data.id}} will get you the id for the selectedRow if you're just selecting one row at a time!

{{ yourTableName.selectedRow.data.Invnbr }}

If this still doesn't work for you, I'd be happy to step into your app :slight_smile: Just let me know the name of your app!