AnsweredAssumed Answered

Using globals in relationships

Question asked by jurgmay on Mar 25, 2016
Latest reply on Mar 25, 2016 by jurgmay

Hello!

 

I have a solution which uses a global in a Customers table called gStatusActive and this is joined to a Subscriptions table occurrence which has a field called 'status'. The Subscriptions::status field can be 0: Expired, 1: Active or 2: Pending.

 

I want a portal on a layout based on the Customers table that ONLY shows the Active subscriptions. I set the Customers::gStatusActive to 1 and joined it to the Subscriptions TO by linking Customers::gStatusActive to Subscriptions::status. I added the portal based on that relationship and it works just fine.

 

The problem I have is that when I close the solution and open it up again Customers::gStatusActive loses its value and therefore the portal is empty because Customers::gStatusActive is empty. I understand that globals are session based and don't persist but is there a way to set a default value? gStatusActive will ALWAYS be 1. I figure I could script it in my startup script but that seems like it shouldn't be necessary.

 

I'm running the solution on FileMaker Server so I'm wondering if there's something I need to do there? I tried closing the solution on FMS and then using FMA on the server box to update the gStatusActive field and then upload again to FMS but the same thing happens.

 

I feel like I'm missing something obvious or maybe the approach is just wrong?! I'd appreciate your input.

 

Thanks!

 

Juerg

Outcomes