I have a php script to which I pass a database name and a static layout name to get back a list of fields it contains.
These fields will be used for a mail merge.
My script can return the field names on the layout with no problem but I need to know the table from which these fields are coming.
I understand I can get table names from portals on the page but I want only the default table for the layout.
I need to do this dynamically with PHP.
I am really struggling with the documentation and don't see methods for doing this.
Maybe I'm missing something