titanium76

Global Placeholder Text

Discussion created by titanium76 on Jan 17, 2018

I created this custom function several years ago. Enjoy.

 

 

/*

2015-2018, Ryan G. Thorpe

Global Placeholder

 

Format:

  Global Placeholder (FieldName)

 

Field Comment Format:

  comment text {{placeholder text}}

 

Note:

  replace "FieldName" with "Self" in Placeholder text edit box

 

 

*/

 

Let (

[

  comment = FieldComment ( Get ( FileName ) ; GetFieldName ( FieldName ) );

  start = Position ( comment ; "{{" ; 1 ; 1 ) + 2;

  end = Position ( comment ; "}}" ; 1 ; 1 );

  length = end-start

];

 

Middle ( comment ; start ; length ))

Outcomes