Mapping Object ID to Name

How can I cross reference the object ID field to the Name of the Object? I assume that there is a table that contains this information by I haven’t figured out which one it is.

There is a system table called “AllObjWithCaption” from version 3.?? on. Primary key is “Object Type,Object ID”. Create a record variable: “Obj” Record “AllObjWithCaption” and use it like: Obj.get(Obj.“Object Type”::Table,27); message(Obj.“Object Name”); Result will be: “Item”

quote:


Originally posted by Beaver
There is a system table called “AllObjWithCaption” from version 3.?? on.


Actually, from 2.65 and above. [:)] If you need the Object’s Caption (which depends on which language the user has selected), Beaver’s tip is the way to go. If you need the Object’s Name (which is language independent), you should look at the system table Object.

but Object table has this nasty primkey with Type,Company Name,ID… not so nice for getting objects…

Just use a blank company name and it will work fine. Only the TableData Objects have the Company Name filled in. All other Objects have Company Name ‘’.

So, the good news is that the table exists. The bad news is that it can’t be viewed directly from the system, but must be accessed via code. I was hoping to be able to quickly view and “export” the table to cross reference the object ID field in the Permission table. Based on the replies I have received (thank you for the replies!) there doesn’t appear to be a quick way to export the object table to a .txt file.

quote:


Originally posted by JoeBloe
So, the good news is that the table exists. The bad news is that it can’t be viewed directly from the system, but must be accessed via code. I was hoping to be able to quickly view and “export” the table to cross reference the object ID field in the Permission table. Based on the replies I have received (thank you for the replies!) there doesn’t appear to be a quick way to export the object table to a .txt file.


Not exactly… you can’t modify the data, but you can always create a form based on that table, or a dataport or a report or whatever you need. You can always create forms based on those “virtual tables” without problem. In your case, just create a dataport and you’ll have everything on a .txt file in an easy way.

Why not? There are quite a few options: - You could create a Form based on the Object table from where you can view all records and fields that are not visible through Object Designer; - You could also create a Dataport that exports the Object table to a text file. Furthermore, it sounds as if you’re trying to setup the security system through permissions, but are finding it difficult to relate the Object ID’s to the Object Names. Am I right? If this guess is correct, are you setting permissions from Tools, Security? On the Permission table, there is a FlowField that shows the Object Name. Sorry if I am being too obvious… [:)]

Cehck the function I wrote: ExportTableData Parameters:

  • liTableID (Integer): ID of Table to export Data
  • lbWithFlowFields (Boolean): Calculate and export also FlowFields
  • lbWriteFieldID (Boolean): Write Header Row with Field IDs (Field No.)
  • lbWriteFieldName (Boolean): Write Header Row with Field Names (Field Name)
  • lbWriteFieldType (Boolean): Write Header Row with Field Types (Data Type)
    http://www.mibuso.com/forum/viewtopic.php?t=2761