Select statement where row id from a table = -1

Hi, I have a power table with a custom propertie named “fila” binded to the selected row of the table. Then I have a textbox with this sql query:


SELECT centro_maquina FROM partidas_paradas WHERE id = {Root Container.Power Table.fila}

When I select a row this statement return “centro_maquina” from “partidas_paradas” where id equals the selected row.

The problem happen when there is not a row selected, the id equals -1 then there is 0 records returned and I get errors.

How can I solve this?

You could enable the “Fallback Value” on the SQL Query binding and provide a fall back value.

Best,

That was so easy! thanks again nmudge, sorry for asking so many questions.

MoisesZV,

It is quite all right. Questions is what the forum is for. Ask as many questions as you like.

Best,