Filter power table based in

Good day,

I have a power table linked with a database that i want to filter based in a specific value. I know that the power table has a filter option from the header, but to simplify the activity in production, i want to scan a code in the text field, press the button and then have the same filter process from the header but with script. Does someone knows how to perform this?

image

I appreciate all the help.

Regards
CMV

I usually do this sort of thing in my query binding using the text field property as a query parameter. The power table can then be updated with a refresh

2 Likes

Another way to achieve this is by adding this script to the button:

table = event.source.parent.getComponent("Table")
 
text = event.source.parent.getComponent('Text Field').text 

data = system.db.runPrepUpdate("SELECT <something> FROM <YourTableName> WHERE PartNumber = ?", [text])

event.source.parent.getComponent('Table').data = data
1 Like

Thank you guys for your support.

Regards
CMV