Page 1 of 1

Merge Fields on gzh_ and gzm_ Layouts?

PostPosted: Thu Aug 17, 2017 8:12 am
by TheBridge
I have a lot of tables to sync and therefore 2 x the layouts to build.

I can gather the fields I want to place on my gzh_ and gzm_ layouts with an SQL query something like this:

Code: Select all
Let ( [

   ~fs = char ( 9 ) ;
   ~rs = ">>" & char ( 13 ) & "<<" ;

   ~q =
      List (
         "SELECT" ;
         "   FieldName" ;
         "FROM" ;
         "   FileMaker_Fields" ;
         "WHERE" ;
         "   TableName = ? AND" ;
         "   NOT FieldName LIKE 'gz_%' AND" ;
         "   NOT FieldClass = 'Calculated' AND" ;
         "   NOT FieldClass = 'Summary' AND" ;
         "   NOT FieldType LIKE '%global%'"
      ) ;

   ~sql =
      substitute (
         ~q ;
         [ "~param" ; "" ]
      )

] ;

   "<<" & ExecuteSQL ( ~sql ; ~fs ; ~rs ; get ( LayoutTableName ) ) & ">>"

)


which produces a list something like this:

<<id>>
<<modifiedDate>>
<<createdDate>>
<<name>>
<<address>>


and so on.

My question: does GoZync consider merge fields on a layout as fields that are present on the layout, or will it only consider actual field objects as fields that are present?

My technique will save me a great deal of time hunting and pecking through the Field selector, even with its ability to sort by type.

Thanks,

Peter

Re: Merge Fields on gzh_ and gzm_ Layouts?

PostPosted: Thu Aug 17, 2017 8:57 am
by John Sindelar
Hey Peter,

I like the idea, but GoZync uses FileMaker's design functions (like "FieldNames()") to find the fields on your layout and that function does not support merge fields. Sorry about that.

Sincerely yours,

John

Re: Merge Fields on gzh_ and gzm_ Layouts?

PostPosted: Thu Aug 17, 2017 9:49 am
by TheBridge
rats.

Well, thanks for the quick response! I guess I need to start billing hourly. :D