Normal Topic Open Form In A New Tab With Limits? (Read 8449 times)
BWETTLAUFER
Full Member
***
Offline



Posts: 216
Location: Cambridge, Ontario
Joined: Apr 9th, 2010
Open Form In A New Tab With Limits?
Nov 8th, 2020 at 11:34pm
Print Post Print Post  
Hi all,

I have a small conundrum ... in my database, I've built two forms (call them Form1 and Form2), so people could have two work screens open, without leaving a second client session going. 

I am now exploring the option "Open Form in a New Tab", which I've attached to a command button, so far so good, but I want to limit it to having to tabs open at once maximum, so we don't have 50 users with 6 tabs open, and the chaos of all those locked records.

So, I've tried setting in GLOBAL an int variable called vScreens, and every time they use the 'second screen' button it increases the value by +1 in vScreens, etc, but the problem is, every time it opens a new tab, it runs the GLOBAL code, and overwrites my local global value ...

Anyone have any ideas on how to work around this?

Thanks!
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Open Form In A New Tab With Limits?
Reply #1 - Nov 10th, 2020 at 2:48pm
Print Post Print Post  
Hi Blair,

You can use ClientLocalValue() to keep track of this. In the On Application Open event just initialize it to 0. Then when the button is clicked increment it by one and then when the user clicks the Close Form button, decrement the ClientLocalValue() by 1.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
BWETTLAUFER
Full Member
***
Offline



Posts: 216
Location: Cambridge, Ontario
Joined: Apr 9th, 2010
Re: Open Form In A New Tab With Limits?
Reply #2 - Nov 13th, 2020 at 5:38pm
Print Post Print Post  
Thanks Ray!  I'll give that a try!
  
Back to top
IP Logged