SRP Tech Bites v1

Welcome to volume 1 of a new blog series. SRP Tech Bites will be different from our normal tutorial oriented articles since it will provide readers with several smaller nuggets of potentially useful information. While these juicy morsels will mostly be oriented toward OpenInsight, we will expand your palette by including useful information from a wider range of technology topics. With the release of this inaugural edition of SRP Tech Bites, we extend an invitation to all of our readers to contribute their own delicacies. So don’t be shy…we are happy to share the limelight. Until next time, please enjoy a sampling from today’s menu…

BASIC+

  • OpenInsight has an undocumented function called RTI_List that provides automated housekeeping for SYSLISTS records. We have created unofficial documentation based on the information gathered from the Revelation forums. – Don Bakke
  • RTI_CreateGUID has been in the product since 9.1 and is a great utility when you need to create a GUID. However, the documentation omits the outFormat argument and how it can be used. If outformat is empty or unassigned, RTI_CreateGUID returns a straight 32-character GUID (e.g., 6651FE58A620465C86783FB3C9688139). If outFormat has a value of “{” you’ll get a Microsoft canonical GUID (e.g., {6651FE58-A620-465C-8678-3FB3C9688139}). Finally, if outFormat has a value of “B” (or “b”), you’ll get a Base64 encoded GUID (e.g., ZjjJZE4X1ESKdlG9FDTMPA__). – Don Bakke
  • Another undocumented but useful function is RTI_IsMember. Primarily used for SSO enabled applications, this utility determines if a specified user is a member of a specified Advice Directory group:
    IsMember = RTI_IsMember(GroupName, UserName, DomainName)Jared Bratu
  • Most developers know that SSO allows users to be granted User, Administrator, or System Administrator access level just like legacy authentication. Likewise, the system variable @ADMIN will still be populated with a value of 0 (User), 1 (Administrator), or 2 (System Administrator) accordingly. This makes it easy to quickly determine the access level of any active SSO user without further authorization logic. – Don Bakke

Form Designer

  • Most people know that using the Up, Right, Down, and Left arrow keys will nudge a selected control (or group of controls) in the appropriate direction. What is less known is that pressing Ctrl+Up, Ctrl+Right, Ctrl+Down, and Ctrl+Left will resize the control. Much easier than using the mouse when trying to make those small changes. – Don Bakke
  • Changing the tab order of a control can be daunting if there are many controls on the form. Unfamiliar developers assume that one must start with the first control and keep clicking until the control that needs to be changed is reached. It is actually possible to skip controls simply by first pressing Shift and then clicking on the last control whose tab order is already correct. Thus, let’s say you just added the 100th control to the form but you need it to be in tab order 51. Just select the Tools > Order Tabs menu, Shift+LeftClick the control with tab order 50, and then click on the control you added (which will now say “51”). You can return to design mode and repeat this process as often as needed to quickly change the tab order of multiple controls. – Don Bakke

Database Management

  • A very useful technique to glean information about an attached table (or to determine if a table is not attached) is to attempt to open its row in SYSTABLES. If you use the SRP Editor, just press F5 to get to the command line and enter EDIT SYSTABLES TableName. Information such as the volume, OS file name, database, and installed MFS routines will be presented. – Don Bakke
  • SYSTABLES is a read-only virtual table (i.e., memory resident) that is populated from the contents of the active DBT file. It is updated when actions like adding, removing, or aliasing tables are performed. When the Database Image is saved, the current contents of SYSTABLES is used to re-populate the DBT file. – Don Bakke
  • Adding or removing an MFS is fairly easy to do with the DLG_MFS form (which can be accessed from the Database Manager’s File > MFS Table Control menu). However, this utility only updates the Media Map (REVMEDIA pointer). If this table already exists in the Database Image but the developer does not save the Database Image there will be unexpected behavior. This is because the MFS is also defined in the Database Image and this will always take precedence over what is contained in the Media Map. The easiest fix is to re-attach the table (which will refresh SYSTABLES) and then save the Database Image. – Don Bakke

SRP Editor

  • The SRP Editor allows you to add the currently open item into an existing RDK View. Just press F6 to bring up the Add to Repository dialog and tick off those Repository Views you want updated. Also, if the open item is a record, this feature will automatically create a Miscellaneous Application Row entity pointer for you. This makes it very easy to deploy individual data records (like configuration records) or dictionary records. – Don Bakke
  • Another SRP Editor feature that can save time is the F12 “Goto Source” key. Officially this feature is mapped to Ctrl+Shift+G, but F12 works just as well and might be more convenient. Also, in case you didn’t know, this key will jump to stored procedures, inserts, and internal labels. – Don Bakke

(Editor’s comment #1 – We regret that this article was unintentionally published prematurely a couple of days ago. Despite our attempts to keep the document in draft mode, the system still released it when it wasn’t ready. Sorry for the confusion!)

(Editor’s comment #2 – There is nothing new under the sun. By that we mean that much of what might be published in SRP Tech Bites has already been noted, mentioned, or referenced in other sources. However, not everyone has access to all other sources of material and sometimes it just plain helps to read something more than once!)

Leave a Reply