Get data from database  comparing two values in dropdowns
Application Type

Good night. I need to Verify the values in two dropdowms( X and Y ) in the database and get the third value in the database ( Atributte "Libras" ) and put then in the Field ( Z ). 

X is the attribute Ponto, variable "PontosEsq".

Y is the attribute Vareta, "PontoVaretaEsq".

Z is the Attribute Libras, "LitrosaAabastecerEsq". I´m sending 4 images. In the image4.jpg shows the expression that i´m trying to do. 

Edit: I changed my Expression to this 

If((PontosEsq!  and PontoVaretaEsq!) , LitrosaAbastecerEsq = GetTabelaPontosCombustivels.List.Current.TabelaPontosCombustivel.Libras, "")

 but now show the error: 

Expecting an expression instead of end of line. 

Could anyone can help me with this?   what i am doing wrong?




Hi Rodriga,

Can you please explain your problem in details, how you want to validate these values and how it will give you result for the third value.

Along with that just keep in mind the If condition syntax in outsystems look like this:

If(<your condition>, <what to do if condition is true>, <what to do if condition is false>)

If(<your condition>, --> i need to verify if this two variables have any information different from null

<what to do if condition is true>, in this case i need to get a data from the database in de Attribute ou column "Libras" in the Row where the the values of X and Y are the same in the Columns Ponto and Vareta. Like image5.jpg.

<what to do if condition is false>) --> in this case dont need to do nothing. 


For example: in the case the Dropdown X have the value 2 and the dropdown Y 0.4 so i need to put in the Field Z the value 900.

Hi Rodrigo,

An exclamation mark behind a variable is not a proper expression in Outsystems, instead do PontoEsq<> 0

But apart from that syntax problem, you are probably not going to achieve anything.  You will have to go find the appropriate record with the value of ponto and vareta, either by using them as filter in your aggregate and refresh the aggregate, or by not filtering the aggregate but applying a list filter on the aggregate result. 


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.