Brickwit (David)
Brickwit (David)
Mmarimo
Created by Brickwit (David) on 9/24/2024 in #help-support
How to get a value from selected row on a table?
I have an exisitng table with "single" selection enabled. When I select a row,
filtered_data := mo.ui.table(result, selection="single", show_column_summaries=False)
print(filtered_data.value)
partid year price
1 60441-1 2024 31.99
1 60441-1
print(filtered_data.value['partid'])
1 60441-1
print(filtered_data.value['partid'][1])
60441-1
filtered_data := mo.ui.table(result, selection="single", show_column_summaries=False)
print(filtered_data.value)
partid year price
1 60441-1 2024 31.99
1 60441-1
print(filtered_data.value['partid'])
1 60441-1
print(filtered_data.value['partid'][1])
60441-1
How do I get the partid of the selected row? I don't know in advance what index number of that row is?
3 replies