Display frow two different table list record

Hello, I have two tables selected, it is possible to save data normally, but to edit data, the values of a table do not appear in Screendetail. saves, but does not show. can anybody help me?


Rennan Silva wrote:

Hello, I have two tables selected, it is possible to save data normally, but to edit data, the values of a table do not appear in Screendetail. saves, but does not show. can anybody help me?


Without specified oml, I cannot confirm anything about your case

As I guess, "with or without" = left join, so that the notes has no cotas to show. If you assure that the notes has cotas, please change it to "only with" 


Hi Rennan,

I think either your cotas entity data is not getting saved or you are not retrieving the data correctly. It would be better to provide oml file of your application until then, can't say anything for sure.

Thanks

Divyanshu

Rennan Silva wrote:

Hello, I have two tables selected, it is possible to save data normally, but to edit data, the values of a table do not appear in Screendetail. saves, but does not show. can anybody help me?


Hi,


Could you please check in the table that has a proper id in the mapping column.


Especially in the Notes table what is the CoatsId and then check in Coats table.


If possible share data snap


Hello Rennan,


Your data model seems... "weird" :) 

Many different "Cotas" can share the same "Notes"? Because you are setting a 1-to-many relationship between them, and as Notes is the entity that has the Foreign Key (CotaId), it is the "many" side (even if your logic does not allow this to happen.

As it is, what happens here is that you need to first create the Cotas record., than, assign the output ID of this newly created attribute to the CotaId attribute in the form (in the Notes entity), and than create the Notes record. 

The most probably cause for the Cotas to not appear when you edit your record is that the CotaId attribute of Notes is empty, because you its value is not defined in the form at the time the CreateOrUpdateNotes is executed.
I really can't see any other reason for that, at least based on what you showed. Showing your saving code can cast some light over the issue, though.

BUT... If you have a 1-to-1 relationship between Notes and Cotas, you should remove the FK in Notes, and change the Id of Cotas to be a Notes Identifier, OR, if COtas is more important than Notes, like, you can have cotas without Notes, the contrary. 

The save must still be like this. You create the most important record first and use the ID returned to update the form for the other record, the one with the FK (or PK-FK).

Hope this helps.

Cheers.