Access data of one column for a selectedRow in a table compo

How can I access a data of one column for a selectedRow in a table component.

I have a table component with data populated. There’s a column that has a type of integer called minorec. I’d like to have a disabled button which will be enabled when user selects a row with minorec column has value greater than 0.

From my understanding, I should be able to do like this

{Root Container.Batch}[{Root Container.Batch Table.selectedRow},"Minorec"] > 0

Explanation, from the Batch Table dataset, get the value of Minorec from the selected row.

The above expression gives me this error

[quote]Type mismatch in operation ‘Greater Than’: expected ‘Number’, found ‘Object’
Thank you

try doing it like this. first add a custom property to your table with an integer data type. then put this as the expression.

try({Root Container.Batch}[{Root Container.Batch Table.selectedRow}, "Minorec"], -1)

then create an expression on your buttons enabled and/or visible field and use this:

if({Root Container.Batch Table.selectedID}>0,1,0)

Thank diat150 for the response.

I don’t think your method gives me what I need.

From the attached pic, you can see I have a table with minorec column with different values.
I want the Minor EC button to be enabled when I select the first and last rows where its minorec value are greater than 0. I want the button to be disabled when I select the 2nd row.

From you expressions and selectedID, it will just enable no matter what row is selected.

Thank you again for your time.

have you tried it? I can assure you that it will work. keep in mind that the custom property on the table should be named selectedID. you can name it whatever you want, but just change the code that I pasted on the enabled property of the button to match whatever you name the custom property that you create on the table.

Not sure why it works now.
I’ve tried it earlier and it didn’t work like I want. Then I modified the expression and it still didn’t work. So I posted the response to you.

Now I have tried to again and it just works.

Anyway, thank you very much. I really appreciate.