Normal Topic Invisible fields on Subforms (Read 4068 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Invisible fields on Subforms
Dec 5th, 2004 at 10:15am
Print Post Print Post  
I have a number of fields toggling Visibility status based on @ADD/UPDATE.  These are on a subform in TableView on the parent form.

Randomly (to me) some of the Invisible fields are bleeding through the Table View in the blank area beneath the rows of data.  The fields seem to be in the same position they would occupy if the data was in form view vs. TableView.

I have added a ForceRedraw() to the subform with OnFormEntry, but this does not correct it.

(1.0.5Beta)

And here is a screen shot of the problem:

This shows three solid boxes bleeding through, a dotted box bleeding through, while the cursor is in Record2, Unit Price field.
« Last Edit: Dec 6th, 2004 at 12:32am by Bob_Hansen »  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Invisible fields on Subforms
Reply #1 - Dec 6th, 2004 at 12:26am
Print Post Print Post  
More troubles in the same area.  Invisibility does not appear to work in subform TableViews.  Works OK in from view.

I have a global value that toggles when ORDERS form is ISNEW or UPDATE.  Value is "Ordering" or "Receiving"

ORDERS has a subform that toggles Visibility and ReadOnly of some elements based on global value.

When the ORDERS form is at ISNEW, the subform elements that should be invisible are showing along with all other elements for data entry.  And items that should be ReadOnly cannot be accessed.

Code from ORDERS form: On Form Entry
Quote:
IF @UPDATE THEN {
GlobalValue("gvalStatus","Receiving")
}

IF @ISNEW THEN {
GlobalValue("gvalStatus","Ordering")
}


From DETAILS Subform: On Form Entry
Quote:
//=====================================
IF @GlobalValue("gvalStatus") = "Ordering" THEN {
//Make fields invisible when ADDing records.
     Visibility(QtyReceived,0)
     Visibility(UmRecv,0)
     Visibility(RecvUnitPrice,0)
     Visibility(DateReceived,0)
     Visibility(AmountPayable,0)
     Visibility(PODate,0)
     Visibility(Status,0)
     Visibility(PromiseDate,0)
}
     
IF @GlobalValue("gvalStatus") = "Receiving" THEN {
//Make fields visible when RECEIVing records.
//Make fields ReadOnly when RECEIVing records
     Visibility(QtyReceived,1)
     Visibility(UmRecv,1)
     Visibility(RecvUnitPrice,1)
     Visibility(DateReceived,1)
     Visibility(AmountPayable,1)
     Visibility(PODate,1)
     Visibility(Status,1)
     Visibility(PromiseDate,1)
     ReadOnly(HHPartNumber,1)
     ReadOnly(Qty,1)
     ReadOnly(DueDate,1)
}      

Using the Global Manager,I can check the value of the GlobalValue, go to Preview mode, and open up the subform directly.  If status is "Ordering" the form  looks like status is "Ordering", the desired fields are invisible.

If I change the Subform view from Table to Form, the correct layout is there,

But if Subform is in Table View, then it behaves like "Receiving", and showing me fields that should be invisible locks me out of fields for Data Entry because of Read Only.
And you can see the Status is "Ordering" in a msgbox I provided to help troubleshoot

I believe that the programming is correct.  I think that this is probably a real error to be corrected. (using 1.0.5Beta)




  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Online


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Invisible fields on Subforms
Reply #2 - Dec 6th, 2004 at 3:24pm
Print Post Print Post  
Hello Bob,

Could you send this application, .DB and .DAT, to Support along with steps and where to look to see the problem?

-Ray
  

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


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Invisible fields on Subforms
Reply #3 - Dec 6th, 2004 at 5:48pm
Print Post Print Post  
Has been sent......thanks for help....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Online


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Invisible fields on Subforms
Reply #4 - Dec 6th, 2004 at 7:51pm
Print Post Print Post  
Hello Bob,

In the current release or in 1.1, you can not change the Visibility or Read-Only status of elements on a Table view subform dynamically from SBasic.

-Ray
  

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


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Invisible fields on Subforms
Reply #5 - Dec 6th, 2004 at 8:02pm
Print Post Print Post  
Thanks for reply.  Has a big impact on designs.  Means that I need different subforms that are missing fields completely vs. toggling status.

Seem to recall that this was seen as a problem in earlier versions, and there was a message from Lanitca here that 1.0.5 corrected this.  That followed a suggestion to make unwanted fields narrow, so they would appear to be invisible.

I guess it doesn't matter what was said if it still is a problem.  I will modify my design as necessary.  Thanks for looking into this.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Invisible fields on Subforms
Reply #6 - Dec 6th, 2004 at 8:07pm
Print Post Print Post  
I was correct.  Please see the archived posting here: http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=archived;action=display...

It is mentioned a number of times that this was corrected.
From Erika on Sept 17: Quote:
  Before you go all out on the workarounds, we were surprised that simply setting Visibility to No doesn't work. We have code in there to automatically hide table view subform columns that are meant to be invisible. We didn't realize that something was interfering with it.

We're looking into it now, and 1.0.5, which will be available within a couple of weeks (earlier if you are coming to the Conference) may simply respect your Visibility setting and you won't have to mess with any of this other stuff.


Please double check and clarify before I start work to make new subforms.   If not corrected, then I also suggest that the  original posting be updated with correct information.


Thanks again.....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Online


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Invisible fields on Subforms
Reply #7 - Dec 6th, 2004 at 8:18pm
Print Post Print Post  
Hello Bob,

I believe that was setting the visibility of an element on a table view subform in designer, which in 1.0.4 had no effect. 

In SDesigner 1.0.5 Beta and SDesigner 1.1, you can set an element on a table view subform to be invisible, but you can not change it's visibility with SBasic.

-Ray
  

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


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Invisible fields on Subforms
Reply #8 - Dec 6th, 2004 at 9:36pm
Print Post Print Post  
So you are repeating and confirming what I said earlier then.  I need to have separate forms for each TableView subform. 

1.  Each form will have the ReadOnly/Visiblity elements set in the Designer. 

2.  If I need five different TableViews for subform then  I am able to turn subforms visibility on/off with SBASIC. 

3. But I will still need to duplicate programming in all five of the forms when all I want to do is change view, limiting which elements the user has access to.

====================
I guess another alternative will be navigation programming in each of the elements of the form that throwfocus based on which TableView I desire.  Will define the desired view with a global variable and use that to control navigation.  For example if GlobalValue indicates "Receiving", then all elements for "Ordering" will throw focus to another "Receiving" element.  That should take care of ReadOnly issues.  Now need a method to make "invisible".  Changing colors won't work in TableView, and no way to make narrower. 

Just one more challenge.....who has a solution for this?
========================================
I would like to strongly ask that this be corrected in a future release, probably too late for 1.1.  The ability to have multiple views with a subform loses a lot of flexibility if programming needs to be duplicated for every view.

I suspect that the Tab Ordering for the form also does not affect the Table View.  That should be another option, the the TableView would follow the defined TabSequence vs. the layout sequence.


  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged