How to Hide dynamically an entire row in a grid application?

Hi All,
I am new to scriptcase. To familiarize myself with it, i am writing a small project. I am currently working on a Grid application. My SQL statement has successfully generated the Grid. Here is my problem:
I have a calculated field in the Grid named ‘Total’ (Dynamically Calculated). Total = Unit Price * Qty. I would like the Grid to show only records (Rows) for which ‘Total’ is greater than 5000.

I have tried to use sc_field_display, but not getting the expected result.

Can you please help.

Best Rgds

Do this calc on your SQL statement with a where clause.

Hi Giu, Thank you for you reply, unfortunately ‘Unit Price’ and ‘Qty’ are not stored static data in the database. I use a script through ‘onRecord’ event to get (Calculate) them on the fly. That is why i cannot directly do my calc (greater than 5000) through my initial SQL statement where clause.

Dpnt understand. If its a grid, unit a quantity should come from somewhere, then, you can exclude in your sql.

In other words. You can’t tell scriptcase to not render a row based on a value. You can modify the data showed and all f this, but you cant avoid a record to be rendered. I hope I explained

Thank you Giu. I will look back into my logic.

Hi. I did a search in my database and it show in a grid. Then with the event “onRecord”, i compare values between two fields of the grid with the extracted values from two different tables.
My question is, if the subquery in both fields is 0 (zero), its possible hide that registry of the grid or at the time of export into PDF, delete that registry.

PD: Im spanish, sorry for my english.