Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3488 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am interested in rendering multiple virtual lists on the same layout at the same time. A couple methods have occurred to me, but the method that seems easiest to implement would be to simply use repeating fields for my Virtual List table, and making sure to reference the correct repetitions in the scripting and on the relevant portals. Seems like that way you could have as many virtual lists on a layout as you have repetitions for your fields.

I have no idea if this is a bad idea or a good idea, if it negatively impacts performance compared to other techniques such as having multiple virtual list tables, etc. Is there a widely accepted technique that is considered the best way to render multiple virtual lists on the same layout? Or is my idea as good as any? Any advice here is appreciated!

Posted

Repeating fields sounds like a clunky way to handle it. How many portlals do you need? Without knowing details, I'd probably opt for mutiple VL tables. Tables are cheap.

Posted

You could also add a "category" value to the virtual lists. And then only show specific categories of records in each portal. I haven't thought all the way through this, but it seems like it could work.

Posted

I've done this before - I use different fields to only insert the IDs.  The portal is then filtered down to only produce the records if it's ID is not empty (please see attached).

This is rough of course - you would want to perform a find for your records in each table first before gathering their values into global variables but it should be enough for you to get the idea of it.  I have only used this on smaller displays and I would not use it to filter really large record-sets.

MultipleVirtualLists.fmp12.zip

Posted (edited)

I'm sorry - I should have created this in version 11 for those not yet moved up in version.  It works in older versions as well.  Attached is graph and here is simple script for it:

#
# GO TO INVOICES
Go to Layout [ “Invoices” (Invoices) ]
Set Variable [ $$invoiceIDs; Value:Invoices::sListOfIDs ] 

# GO TO ACTIVITIES
Go to Layout [ “Activities” (Activities) ]
Set Variable [ $$activityIDs; Value:Activities::sListOfIDs ] 

# MAKE SURE VIRTUAL HAS ENOUGH RECORDS
Set Variable [ $maxCount; Value:Max ( ValueCount ( $$invoiceIDs ) ; ValueCount ( $$activityIDs )
)]
#
Freeze Window
Go to Layout [ “Virtual” (Virtual) ]

If [ Get ( TotalRecordCount ) < $maxCount ]

Loop
New Record/Request
Exit Loop If [ Get ( TotalRecordCount ) ≥ $maxCount ]
End Loop 
End If
#
Go to Layout [ “Dashboard” (Dashboard) ]
#
Refresh Window [ Flush cached join results ]

# #

 

The virtual table only holds a serial ID and then cInvoiceIDs  which is unstored calculation GetValue ( $$invoiceIDs ; serial ) and cActivityIDs which is GetValue ( $$activityIDs ; serial )

 

Multiple_virtual_graph.png

Edited by LaRetta
Posted

Thanks all for the input! Sounds like there are indeed a lot of variations on how to approach this scenario. And lots of fancy ideas here to experiment with! Really like the idea of using a category field, I think I could see how I could get that to work. And @LaRetta thanks for the detailed examples! It's quite a bit different setup from how I use my virtual table, but there are some great ideas in here that will undoubtedly be helpful to have in my databanks (for example, I really like that automatically expanding virtual table should it not have enough records, haven't seen that before).

Since there are so many ways to approach it, I will likely approach it either as multiple VL tables or my original idea of converting my VL table to repeating fields. Multiple VL tables is pretty easy, but for some reason feels redundant to me. Maybe it sounds clunky to some but for some reason it makes a lot of sense in my head to just use the one virtual table with repeating fields, assuming the performance wouldn't be dramatically different from other methods.

 

Posted (edited)

What happens when repetition 1 is empty but rep 2 isn't? Blank rows in portal 1?

Edited by Fitch
Posted

What happens when repetition 1 is empty but rep 2 isn't? Blank rows in portal 1?

​These are good points, and the kinds of things that I need to be mindful of. I'm not able to devote all my time to development so I appreciate the warnings for potential pitfalls.

I haven't dug into this problem just yet as I'm on a deadline for some other things at the moment, but if I get some time to experiment with this perhaps I'll work on a sample file first. If it works well I'll post it here. Otherwise I'll just use multiple VL tables. Thanks again.

This topic is 3488 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.