Metadata in tabs?

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
Posts: 25
Joined: 2013-12-05 02:54

Metadata in tabs?

Post by dge » 2023-01-27 02:13

Code examples from the appginiHelper website indicate it's possible to show Metadata in a tab but I can't get it to work. Using the latest appgini (22.14) and latest appgini helper version, I can create a tab called Metadata but it won't show anything in that tab (though my other tabs work fine). It would be very useful to be able to see the creator, modifier and modification date like the examples show!

This is my code:
var dv = AppGiniHelper.DV;


var row_1 = dv.addLayout([2,8,2])
.add(1, ["prodPhoto","displayOrder", "backorder","odHide"])
.add(2, ["productFamily", "productType", "prodID", "custom", "odDescription", "productNote", "odNotes"])
.add(3, ["quantity", "listPrice", "copyFunction", "priceCharged", "unitsInStock", "quantityShipped" ])

var row_2 = dv.addLayout([6,6])
.add(1, ["invoiceDate", "orderID", "productBOMKey"])
.add(2, ["invoiceNumber","extPrice", "odID"])

var tab1 = dv.addTab( "Item Info", "Item Info", "Item Info" )

var tab2 = dv.addTab( "Utility", "Utility", "Utility")

var tab3 = dv.addTab( "meta-tab", "Metadata", "cog" )
.add(["created_by", "modified_by", "modified_on"]);


The Item Info and Utility tabs contents work as expected but the Metadata tab is empty, it shows nothing.
The console shows these errors: AppGiniHelper Field not found: #created_by, and also Field not found for #modified_by and #modified_on

My code is based on the examples found here: ... view/tabs/
It would be very useful to be able to see the metadata. What am I doing wrong?


User avatar
AppGini Super Hero
AppGini Super Hero
Posts: 1815
Joined: 2018-07-06 06:03
Location: Kiel, Germany

Re: Metadata in tabs?

Post by jsetzer » 2023-01-27 07:22

The console shows these errors: AppGiniHelper Field not found: #created_by, and also Field not found for #modified_by and #modified_on
The error messages exactly tell us that your table does not have those fields.


This tab you have seen is just a normal custom tab, labelled "Meta" (or "Metadata" if you like). Just create it as always and insert your table's fields, for example id, created_by, created_on etc.. nothing special. Ensure your table contains the fields/fieldnames you are using here.

This is a (clientside) Javascript Library. We can only show data we already have on clientside.

The library does not fetch any additional schema information from the database nor from additional membership_* tables nor from any serverside APIs. If you need additional data on clientside you have to fetch that data using AJAX, for example.

I got used to create the following fields on all tables:
  • id (obviously)
  • created_on
  • created_by
  • modified_on
  • modified_by
This makes it easy for me to kind of auto create a tabMeta in all DVs. The function for creating that tab is in header-extras, so I don't even have to write such code in every DV.

So, sorry, nothing fancy out of the box but just well known AGH Javascript Library functions for custom tabs.

Docs for custom tabs ... index.html
Kind regards,
<js />

My AppGini Blog:

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Posts: 25
Joined: 2013-12-05 02:54

Re: Metadata in tabs?

Post by dge » 2023-01-27 17:43

Thanks Jan! Makes perfect sense, somehow I was under the impression it was able to (magically) access the membership tables, but of course javascript can't do that. Maybe adding a little note into the your documentation to remind people of that would be helpful as well.

Post Reply