How to set the value table visible row on the basis of condition

We want to set the table Visible Rows on the basis of condition. For example , If Account Picklist Value is A then Related table of Contact will show 20 records at the first time. Other wise it will not show 10 records at the first time.
We want to show all the records but on the basis of picklist value , we want to control the table Visible Rows property.  

Can anyone help me for this? i don’t want to create a table and render on the basis of condition. So is there any solution for this?

Hi Geeta, I’m not sure if it’s possible to adjust the table’s “Visible Rows” conditionally, however you could set it to “Show all” and adjust the record limit of the model with a snippet. At first, I’d set a default “Max # of records (Limit)” in the Contact model properties, e.g. 10. Also make sure in the model properties that Contact model is not queried on page load. Then create an inline JS snippet like this (given that your Contact model name is “Contact”):

skuid.$M(“Contact”).recordsLimit = 20;

Now there are probably different ways to trigger that snippet, depends on how you want to build your page. You could add an Action Sequence that runs on pageload. Ad a branch with the condition (your picklist = A) and if that’s true, the snippet will be triggered. Please note in the branch “After running the branch” is set to “Continue with the next action”. As next step, the Contact model will be queried and the table shows either 10 or 20 records, depending on the outcome of the condition.