Problem with dinamic combo list in table records

Problem with dinamic combo list in table records

  
 Hello All,

I am having a problem displaying a dynamic combo list in a TableRecords, the List itself is created using a function that depends on a table field, in debug mode the application works fine, but when running without debugging the dynamic lists are not generated, is there a work around to this problem?

I have attatched a oml thar reflects this behavior, i tested it in the last outsystems 5.1 comunity edition.

Thanks

Nuno Guedes.
Hi Nuno,
Here is the solution:



Please test and give us feedback. 

Regards,
Rafael Pereira
Hi Rafael,

Thanks for your reply, i test this out and i'm afraid it does not work, you see, the problem is not from the function that generates the list,
the rpoblem occurs when the TableRecords is Rendered, the field "trTest.List.Current.TEST_ENTITY.Id" is allways null.
This is done because OutSustems Optimizer does not find the usage of the id field in the combo Source Record List property due to a bug. Doing so, the field is not feched in the simple query, thats why in debug mode the application works, because in debug mode the simple query returns all fields. What have i done to solve this problem and worked:
 1 - Replace the simple query for an advanced query (this way all fields are feched anyway, but can lead to performance issues)   
 2 - Place a dummy Expression  to the side of the combo like this: "if (trTest.List.Current.TEST_ENTITY.Id = NullIdentifier(), "" ,"")" as from here the optimizer understands that the field is needed and therefore feches it from the database. (This is what i used)

This is a very subtile bug and took me a while to figure out the solution, i wonder if OutSystems will sove this problem in the future.

Thanks.
Hi Nuno,

It's weird...works fine for me! 
Please try to publish my oml version... (See attach)

Regards,
Rafael Pereira
Hi Rafael, i have published your eSpace and still does not work, like i sayd, it only works if you hit the "Run" button or start debugging in the public area, if you try to access the application with no running / debugging in service studio (try closing it) you will find that the application does not work (the combos are all empty).I
tried this eSpace in a 5.0 environment too and the behavior is the same.

Thanks.

Nuno Guedes.