Portal records

In FMP I can be on a portal row and click on a button that will set a var to that record id and then go to another form (layout) and do a find and display that record in that form. I sure it is basic, but i need some help figuring it out. I would also like to know the advantages or disadvantages of using tab pannels vs a portal. I’m very new to servoy so please forgive my newbieness “is that a real word”. :smiley:

When you click on a record the selected index is set in the foundset. By navigating to the other form you, and you work on the same foundset, the index/selected record will still be the same.

I hardly use portals, imho table views are a lot more flexible.

In form “A”, a portal is displaying a group of related records from table “B”, if I click in that portal row and select that record and then go to form “B” based on the same table “B” as the portal is, won’t that form be displaying all records in table B not just the one I sitting on in the portal? Or will it take me to the same record I setting on in the portal on form “A”. Thanks for your help sorry i’m being dense.

Hi aalonzo

Like Marcel - and I guess many Servoy developers - Tables/Lists in Tabs have proved to be more useful than portals.

With Servoy you will find there are usually several ways to accomplish what you want. One way of ensuring that form B only shows the selected record is to do following:

  • create a Global integer variable gRecord_ID
  • create a Global relationship: gRecord_ID_to_FormB_PK
  • create a Method so that when you click on the Portal line it sets gRecord_ID to the record PK, then goes to Form B, then use Controller loadRecords(gRecord_ID_to_FormB_PK)

Easier to do than describe but should get you started.

Regards

Graham Greensall
Worxinfo Ltd

Graham and Marcel

Thank you both for taking time to answer my post. I figured out how to do what I wanting to do. It was more a skill set thing, I’m a Filemaker developer and am making the more to Servoy, I just want to understand how to do something I already know how to do in FMP. I mostly want to know if data could be captured from a portal row and used in another form. I also want to be open to best practices in Servoy and not just do things the old way. I know I going to change a lot of what I do and am happy to do so.

Thanks again.