Practical Programs Forum Index Practical Programs
Makers of Dv TDM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Table Name Function

 
Post new topic   Reply to topic    Practical Programs Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
Jesse
First Lieutenant
First Lieutenant


Joined: 20 Oct 2008
Posts: 32
Location: Houston, TX

PostPosted: Tue Jul 27, 2010 1:59 pm    Post subject: Table Name Function Reply with quote

I was wondering if the is a method for determining the name of the table that DvTDM is focused on.

We are creating separate tables for projects and sites and connecting Form Design to the new managed tables. These form designs will not have certain fields which are used in our Required fields macros.

Is there a way (Application.ActiveTableName?) to access what table currently has focus when a user is on the form design aside from the form design name?
Back to top
View user's profile Send private message
Pawel
Moderator
Moderator


Joined: 27 Jul 2005
Posts: 759

PostPosted: Wed Jul 28, 2010 10:47 pm    Post subject: Reply with quote

There is no built in property for this at this time.

It would involve a number of lookups:

1) get current form design name
FormDesignName = Application.FormDesign
2) get form design's linked
FormDesignMasterTableID =
... SELECT MasterTableID FROM SY_TEMPLATES WHERE TEMPLATENAME = Quoted(FormDesignName)
3) get table name from
FormDesignTableName =
... SELECT TABLENAME FROM SY_TABLENAMES WHERE ID = FormDesignMasterTableID


However, since you are checking for "Mandatory" fields, it would probably be more appropriate to check whether a specific field is in fact on the Record tab, and this again would involve a number of lookups, linking form designs, screen elements, database fields, etc.

Rather than wirtting a "generic" ValidateAllMandatoryFields() macro function, I would suggest writting a function which takes a list of field names, that you know for a fact exist in the relevant form design, are visible on the Record tab, and are editable, and then validate only those fields.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Practical Programs Forum Index -> Feature Requests All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group