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 


Rank: #69

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.

Rank: #69

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.

Rank: #23946

"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??

Rank: #69

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...