Problem with Creating Tables with different TableTitles in FM via MIF file

New Here ,
May 04, 2020

Copy link to clipboard


HI All, 

I'm trying to create a simple MIF file that contains tables and can be read via FM.  I need this structure for my engineers, so that they can export data into a pre-defined table format - MIF file that I can read in FM. It will be a register list of hundreds, if not thousands of tables.

I have the structure of the table (basically copied the structure given by one of FM's Sample MIF files (included with the FM installation)).
I created the table and a short body page by creating 2 MIF files.

  •  One MIF file is used as the template file with all my paras/chars/tables/variables/master pages/ etc defined. (It's very long)
  • The other MIF file includes for now, one table (it will include all the tables in the Tbls) and the Text Flow. The table is built basically from a table header and body rows. It has an "include  (template.mif) to call the template file (so that this MIF file is "only" about 300 lines long and easy for my developers to follows its syntax so that s/he can auto generate tables from their database into FM - and the developer doesn't have to deal with unnecessary format defs). This will be used to create all the "<Tbl " s in the <Tbls"

Now, because the table format is defined in the template, it pulls all the table format definitions from the template file. Including its **TableTitle**. And herein is my problem.

The MIF file opens nicely in FM with everything except the TableTitle being populated (i.e. the table has a table title, e.g. "Table1: " but this remains blank despite my desperate attempts to populate it via the MIF. 
I tried populating it manually  - i.e.

I opened the MIF file in FM.
Populated Table1: with an example name, 

Saved the MIF file

Opened the MIF file in a text editor and found that this introduced the entire template again into my MIF file.
So I tried using the manually generated lines for the Table Title and copying it into the original 300-line MIF, but that didn't work either.

I also read in the MIF manual that if you create (generate) a table this way, you can call the table format (using <TblTag 'TableNameFromCatalog'>) and then define exceptions to the Table Format by giving the statement name for the specific property and then redefining it.  i.e. create a local definition (instantiation) based on the Table catalog definition. (The MIF manual gives an example of redefining the number of columns and then adjusting their width - there is nothing about the table title property).
For some reason this does not work with the TableTitle. Any ideas why not?

Or am I not defining it properly for some reason?


Here is an example of the code for the tables:  (also attached as a file to this post).

<TblID 11>
# Adding next line with Table Format-this is not needed if I don't need the TableTitle populated. It pulls the format from the template MIF. If I copy the table, it even numbers them correctly, but I can't figure how to get text into them. The string below with the example Register Name doesn't show in FM.
<TblFormat #normally for what I'm doing this line is not needed - up to end of TblFormat
<TblTag `Register'>

#Adding Table Title
<PgfTag `TableRegTitle'> # Forces lookup in Paragraph Catalog.
<PgfNumString `Table 1:\t'> #even without this line, the table shows up in FM with "Table 1: " as its title
<String `Example Register1 Name (Ex_Reg1_SN)'>
> # end of ParaLine
> # end of Para
> # end of TblTitleContent
> # end of TblTitle
> #end of TblFormat
<TblH #this is the Header Row
<PgfTag `chr_CellHeadingReg'>
<String `Bits'>
> # end of Para
> # end of CellContent
> # end of Cell

#... it goes on to end the rows and cells properly. As well as end the Tbls.


BTW- I attached the MIF file with a .txt extension, since this platform doesn't support uploading MIF files (how odd, on an Adobe FM forum, MIF files aren't supported :). So just rename the extension to MIF in to open in FM and add <MIFFile 2017> to the first line. Otherwise, it'll open up fine in any text editor.

Content migration







Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Have something to add?

Join the conversation