Normal Topic non-layout fields (Read 1026 times)
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
non-layout fields
Feb 6th, 2004 at 2:36pm
Print Post Print Post  
Does anyone know of a way to modify fields from a database that are not bound in the layout field? The reason I want to do this is in table view you cannot have hidden fields on a subform but I want to be able to automatically enter values in for certain fields without them being visible to the user?

Any help would be appreciated.

Justin
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: non-layout fields
Reply #1 - Feb 6th, 2004 at 3:09pm
Print Post Print Post  
Justin,

The closest I came to hiding the field in a subform is making a field.  make it very small and remove the label. When this will appear in the subform, it will be very small and may be you put it at the end. For all practical value it would not be seen. You may put goto command on element entry event so the cursor will not stick for anybody to use F6 key and read it and at the same time you can put whatever value you need to by using code.  Just wondering if this may work for you.

We guys here have a lot to learn form programmers, so please stick around and guide us as you feel necessary. Wellcome to the Forum.
  
Back to top
 
IP Logged
 
Justin_ICC
Junior Member
**
Offline



Posts: 95
Joined: Feb 5th, 2004
Re: non-layout fields
Reply #2 - Feb 6th, 2004 at 3:25pm
Print Post Print Post  
Quote:
The closest I came to hiding the field in a subform is making a field.


That is probably the route i'll end up going unless there is a way to directly access the database. Oh FYI you may want to take a look at another discussion I started using the @GlobalVarible may not be the right way to interact between form & subform, there may be a better way to do this.

See the link below:

http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=gen_disc;action=display...
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: non-layout fields
Reply #3 - Feb 6th, 2004 at 4:02pm
Print Post Print Post  
I know that it will work better in 1.0.2 than in 1.0.1 - but I have had great success communicating between parent and child forms using @FormResultSetCurrentPosition and @FormFieldValue in combination:

In Countries.db:

---------------------
// On ENTER Form for City in CIties subform

var ii as int
var str as string

// Find out what instance of the parent we are on.
ii = @FormResultSetCurrentPosition("Countries")

// Get the Countries Population LE here in the subform
str = @FormFieldValue("Countries", "Population", ii)

// Tell the world.
WriteLn("The population of my country: " + str)
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: non-layout fields
Reply #4 - Feb 6th, 2004 at 4:11pm
Print Post Print Post  
You may still be able to use GlobalValues in a multi-user environment, by naming them with the result of @UserID concatenated onto the name:

GlobalValue("COM_" + @UserID, "Some Value")

The drawback is that you would have to require your users to login, thus insuring that they have a user id, and that you have a finite number of users. The advantage is that you can also use GlobalValues for inter-user communications.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: non-layout fields
Reply #5 - Feb 6th, 2004 at 4:17pm
Print Post Print Post  
Thanks Mark, we will certainly use this.  A little note from you gives a total new perspective and opens up the whole new way for us.
  
Back to top
 
IP Logged