TableRecords passing blank value for screen action

Hello,


I am currently working with a TableRecords widget. The widget is using a local list variable to populate. That list gets its data from a server action in the preparation and is also updated in another refresh action.


The issue I am having is occurring when trying to trigger a screen action from a link in each row of the table. I am attempting to pass the current record as a parameter to this action, but no matter what I do it is passed with each property as a null value. I have also attempted to pass the current row number, which is also null.

I have also tried referencing the current row with specifically passing it as a parameter. That does not work either as the TableRecords shows that it has a list with 50 items in it, but each one is missing all the data.

This happens with both submit and ajax submit methods. Is there a reason that this would be happening? I would upload the OML but I am unable to share the code that I am working on.

David Welsh wrote:

Hello,


I am currently working with a TableRecords widget. The widget is using a local list variable to populate. That list gets its data from a server action in the preparation and is also updated in another refresh action.


The issue I am having is occurring when trying to trigger a screen action from a link in each row of the table. I am attempting to pass the current record as a parameter to this action, but no matter what I do it is passed with each property as a null value. I have also attempted to pass the current row number, which is also null.

I have also tried referencing the current row with specifically passing it as a parameter. That does not work either as the TableRecords shows that it has a list with 50 items in it, but each one is missing all the data.

This happens with both submit and ajax submit methods. Is there a reason that this would be happening? I would upload the OML but I am unable to share the code that I am working on.

Hi David,


The data that is showing on the table records is a copy of what you are getting on the preparation. So you want to pass the current record of the table, not the preparation.

It should be something like: <YourTableName>.List.Current.<SourceTable>.AttributeYouWantToPass


I attached a picture of an example to make myself clear.


Hope it helped, if not keep asking and I will try to help :)

Clarisse


Clarisse Carneiro wrote:

David Welsh wrote:

Hello,


I am currently working with a TableRecords widget. The widget is using a local list variable to populate. That list gets its data from a server action in the preparation and is also updated in another refresh action.


The issue I am having is occurring when trying to trigger a screen action from a link in each row of the table. I am attempting to pass the current record as a parameter to this action, but no matter what I do it is passed with each property as a null value. I have also attempted to pass the current row number, which is also null.

I have also tried referencing the current row with specifically passing it as a parameter. That does not work either as the TableRecords shows that it has a list with 50 items in it, but each one is missing all the data.

This happens with both submit and ajax submit methods. Is there a reason that this would be happening? I would upload the OML but I am unable to share the code that I am working on.

Hi David,


The data that is showing on the table records is a copy of what you are getting on the preparation. So you want to pass the current record of the table, not the preparation.

It should be something like: <YourTableName>.List.Current.<SourceTable>.AttributeYouWantToPass


I attached a picture of an example to make myself clear.


Hope it helped, if not keep asking and I will try to help :)

Clarisse


 Hi Clarisse,

Thank you for your reply! I have implemented this in the same way as your picture. It is odd - I have been using OutSystems for a few years and have never had this issue, but I am at  a loss as to why this is happening.

 

Hi,


Could you please check whether you are referring to the correct list in table records?

If possible, Please share a snap so that we can help you easily.


Thanks

JitendraYadav wrote:

Hi,


Could you please check whether you are referring to the correct list in table records?

If possible, Please share a snap so that we can help you easily.


Thanks

 

 Hello Jitendra,


Thanks for your reply! I was away on vacation for a few days, so I am sorry for the delayed response.


I have verified that I am referring to the correct list in my screen action as you requested. I have also verified that the list is being properly populated on the screen and in the refresh action that is used to fill the grid.


In the action where I need to access the row I noticed this:


The list is not empty, as you can see above. However, all of the records in the list have had all of their values reset to their default null value. There was data in the list before the screen action.

Additionally, the source record list is still properly populated.

This is the peculiar behavior that I cannot figure out. I would share an OML but unfortunately I am unable to do so due to the nature of the application I work on.

Hello David,


could you plz also post screenshot of property of table and column expression? You shall hide the letters in expression for abstraction.


Sanjay

Hi Sanjay,


Here is the screenshot of the table records properties. It is bound to a local list. I have Changed the name for the purpose of the screenshot.



David Welsh wrote:

Hi Sanjay,


Here is the screenshot of the table records properties. It is bound to a local list. I have Changed the name for the purpose of the screenshot.



 kindly share the column expression screenshot also, please do not change the complete expression so that we can know what exactly you are calling. Meanwhile I'm trying to reproduce this issue on my personal environment.

 

Hi,


Could you please check data source I mean aggregate from where you are getting list data.

If you are using join just verify the aggregate with test values and see data in the entity.


Or share a snap of data source(Aggregate)


Thanks

JitendraYadav wrote:

Hi,


Could you please check data source I mean aggregate from where you are getting list data.

If you are using join just verify the aggregate with test values and see data in the entity.


Or share a snap of data source(Aggregate)


Thanks

 Hi Jitendra,


I have checked the data source and verified that the data is there. It comes from a SQL query which is wrapped in a server action.


I also debugged it in runtime and verified that there is data returning from the action and it is properly being stored in the source record list.


I would post a screenshot but there is information that I do not want to post on the forum.