[Dublin Template] Modal popup for each row in TableRecords

Forge Component
Published on 2018-10-04 by OutSystems R&D
36 votes
Published on 2018-10-04 by OutSystems R&D
I have ResponsiveTableRecords holding TableRecords control. I want to add a button that will open a popup window with information connected to specific row. For example - I have a list of people and I want to show extended information about specific person in modal window based on the row where I have clicked the button.

So far I've tried extended properties (can't access those in modal) and local variable - for some reason I can post text but data values appear to be empty, so local variable holds static text, but not the row values.

I looked around in a debugger a bit and it looks like at the moment when button is clicked even the REST response AND tableRecords objects both look empty and any input parameter I create for ajax button end up empty as well.

Hello Vlad,

First of all, sorry for the huge delay.

In order to do what you are describing, you need to store the values you want to use on a local variable, and then (before opening the modal), refresh the modal itself.

Here is a small walkthrough:

  • On your page, create a Local Variable (in this case "CarDetailsModal"), and set the Data type to whatever you may need. This is the variable that you will consume on your modal.

  • Then, on your table, add a button to call an Action, using Ajax.

  • On your action, just use the Current value of your table (in this case, CarTable.List.Current) to set the local Variable. Then, you need to do an ajax refresh to the Modal itself. If you do not refresh the modal you will still see the empty values that the Local Variable had originally.

I hope this was helpful, and please let us know if you need any more help.

Best Regards,

Samuel Jesus

Thank you this is very helpful!

Best regards,

Mika Roivainen