Product stock validation with retool postgresql?

hi i got this use case of a inventory management system:

so if user input a value > to the real stock (col qty_available) it should show a error or nofitication and of course dont allow saving like that to the postgresql

i tried this

{{cantidad.value > revisarDisponibilidad.data.qty_available?'No stock for that value, they are only {{revisarDisponibilidad.data.qty_available}} products available' + :'false'}}

but doesnt works, i need to show the qty available to the user

Try this
{{cantidad.value > revisarDisponibilidad.data.qty_available?'No stock for that value, they are only '+ revisarDisponibilidad.data.qty_available + ' products available' :false}}

1 Like

works but if its 0 have false message

any chance to remove that condition to not show false?

got it with {{cantidad.value > revisarDisponibilidad.data.qty_available?'No stock for that value, they are only '+ revisarDisponibilidad.data.qty_available + ' products available' :''}}

thank you @ScottR

1 Like