[WEB]ShowRecord inside accordion

[WEB]ShowRecord inside accordion

  

Hi,


I've seen lots of examples of TableRecords/ListRecords that are able to expand themselves by clicking in one or two elements of the list so that you can get to see the rest of the fields of every item on the list but so far I've not seen any example with ShowRecord instead.


To get it clearer, let's say we have on our ShowRecord a Record Item with 30 fields. As you can guess, 30 fields would be a lot of information to show at once so I was thinking about showing 3 fields of those 30 and once I click on the first showing field, the remaining 9 will show up ( so it gets 10 items in total without the need of reloading, just showing/hiding current information ) and so on with item 11 and the next 11-20 items and the same for the last 21-30 items.


If by chance you're planning to help me by uploading an OML sample, I'm currently using Layout_Normal WebBlock from this attached .oml ( https://www.outsystems.com/forums/discussion/10413/dropdownmenu-onhover/ ). FYI I'm retrieving all my information from REST Services but I don't mind "patching" it so that it works with my REST Services instead of local databases/entities.


I hope I've been clear enough and you can understand me, thank you by advance.


Jordi.



Hi Jordi,

I think the easiest way to go around this is to have Web Blocks that contain the additional information, and put an If widget around them to hide/show them (via Ajax Submit / Ajax Refresh).

Kilian Hekhuis wrote:

Hi Jordi,

I think the easiest way to go around this is to have Web Blocks that contain the additional information, and put an If widget around them to hide/show them (via Ajax Submit / Ajax Refresh).

Hi Kilian,


The problem is, with this case, that I'll be getting a huge amount of information in the preparation of the screen (as you can expect, REST Service ) so I'm not planning on doing any refresh/reload of the page as that would mess up the user experience.


Sorry if I'm being kinda stubborn but are you 100% sure there is no way to collapse/expand ShowRecords with accordion like animation ? I mean, I got myself to get working an if container that will show some ShowRecords whenever a link/button is clicked as that will change the boolean value, which is the condition set on the if container.


Jordi.


Solution

Hi Jordi,

I didn't say you need to refresh the page, I said to Ajax Refresh the single Widget. (Also, but off-topic, you can test in the Preperation whether this is a first time load or not, by using the IsLoadingScreen() built-in action, and decide to not load the REST data again.)

Solution

Kilian Hekhuis wrote:

Hi Jordi,

I didn't say you need to refresh the page, I said to Ajax Refresh the single Widget. (Also, but off-topic, you can test in the Preperation whether this is a first time load or not, by using the IsLoadingScreen() built-in action, and decide to not load the REST data again.)

Hi Kilian,


So, performing an Ajax Refrex on the xxx_Wrapper that contains all the ShowRecords components within if containers will do the job without calling the service and retrieving information that I already have right?


Thank you, I'll try that.


Yes, you should give the If that hides the Web Block a name, and refresh only the If.

Kilian Hekhuis wrote:

Yes, you should give the If that hides the Web Block a name, and refresh only the If.

I didn't know about that one, that should explain why I was not able to only refresh the if containers. 


Thank you again, Kilian!

Jordi.


You're most welcome.