error Refreshing data

Hi, I try to develop something in Reactive web and I have a little problems, I have a form with some Dropbox (with a Dynamic dropbox), when I choose one register from my database, another Dropbox make a filter and show only registers from another entity with the same Id, they work fine, but in the edit page when I try to edit some information, they reset all information that I have saved. I think its because when I did my dynamics dropboxes I use refresh aggregate. 

Can you help me understand my error please, nad help me fix this issue.


Attached my application 

Hello Viktor.

I got tired of filling test data to test, so I'll just go with your description.

GetFormularioById reads the database.

Some of your inputs use the variable GetFormularioById.List.Current.Formulario.___ and you see the values.

The dropdowns use a different variable because you can't use Id as text. It is a way fo doing it.

But you forgot to set all those variables OnAfterFetch so they can have the values already on table.


That should fix the problem.

Nuno Reis wrote:

Hello Viktor.

I got tired of filling test data to test, so I'll just go with your description.

GetFormularioById reads the database.

Some of your inputs use the variable GetFormularioById.List.Current.Formulario.___ and you see the values.

The dropdowns use a different variable because you can't use Id as text. It is a way fo doing it.

But you forgot to set all those variables OnAfterFetch so they can have the values already on table.


That should fix the problem.

Hi Nuno, thank you for the answer.

"GetFormularioById reads the database" A: this is my entity that save my registers from FormularioDetails Page.

"Some of your inputs use the variable GetFormularioById.List.Current.Formulario.___ and you see the values." A: yes because this is the get of my information saved by FormularioDetails. the query of my registers to show what they save.

"The dropdowns use a different variable because you can't use Id as text. It is a way fo doing it." A: use Variable Id Because of the filters, to make my Dropdown Dinamics (Cascade Dropdown).

"But you forgot to set all those variables OnAfterFetch so they can have the values already on table" A: I dont Know How this event work, Im new on Outsystems, I read about the events but dont understand how to set him.

"Assign the first or last record returned by the query to a variable." but I dont know how to set him 


sorry for the basic questions.




Field Unidade Operacional Reporte saves into variable UnidadeOperacionalReport


And on Save you had to save each one of them


The same is valid in the opposite direction. You need to set an action to call after fetch


And set the  value from DB into variables one by one.


But this form is too complex to explain everything on it.


"Field Unidade Operacional Reporte saves into variable UnidadeOperacionalReport" A: yes I save to Variable to compare to the filter of the others aggregate, its the way I do my cascade dropboxes. and after that I save the variables to the respective fields of my entity Formulario.

"And set the  value from DB into variables one by one." If I assign the Variables, What's the Value I will set on the assign??



I see you are saving as text

Source.UnidadeOperacionalReporte = GetUnidadeOperacional(UnidadeOperacionalReport).UnidadeOperacional.Departamento

You need to get back the Id to use on the dropdown.


Back to the example of UnidadeOperacionalReport:

Create the following aggregate (to be called only on demand)


Assign that value to the variable onscreen.



If you had used the Id in Formulario, this would be a lot easier...