26
Views
8
Comments
cascade combobox Edit Page

Hi, I'm doing a project using a cascade combobox.

the logic its good, they save the data very well. but when I go to the "Contenciosoes" Page and select the Register saved to Edit any field, the combobox Cascade make a Reset.

Can you help me.

Attached have the module.



BNIJURIDICOv29.oml

mvp_badge
MVP
Rank: #5

Hi Viktor. 

The reason is simple. You are associating those combo boxes with input parameters in the screen,
But when you^navigate to the detail page from the list page, you pass NULL values for the input parameters.

How to solve it?

You can initialize those input parameters, if they are NULL, with the values saved in the entity. But I would say that you shouldn't have those input parameters at all.

You should bound the combo boxes to the attributes of the form. This way, an existing record would show correctly.

Cheers

mvp_badge
MVP
Rank: #5

P.S. By the way, you shouldn't have the attributes in the entity as TEXT. They should be FK (Entity Identifier) to the correct entities.

Rank: #4039

When you click on any record in the Contenciosoes screen you are passing null value due to which the combobox Cascade make a Rest

Solution:

Sent the proper id value from the Contenciosoes screen instead of null. For that you need to work on data modeling in order to get the ids.

Rank: #4039

Below are the steps you can follow:

Step1:

Change the text datatype of the master table to identifier. Example of one field(Provincia) you have to do this for all the fields which are getting value from the other table:


Step 2:

Under page : Contenciosoes, With link you need to pass the id instead of null.

Do this for other 2 parameters as well.

Step 3:

In combobox, set the variable value to be the form property:

Step 4: 

On click of save button, Remove the code under the assign for this particular field. 

mvp_badge
MVP
Rank: #5

Hi,

I changed your data model and the Contencioso page.

Please, see if this works for you and if you are able to understand the changes.
I tested and it worked here. 

Cheers!

BNIJURIDICOv29Changed.oml

mvp_badge
MVP
Rank: #5

Here is an example of it working: