Topics
All
Mac OS X
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Guides
Examples
New in version:
7.4
7.5
8.0
8.1
8.2
8.3
8.4
8.5
9.0
9.1
Statistic
Text.AddLineNumbers
Adds line numbers to text.
Component | Version | macOS | Windows | Server | FileMaker Cloud | FileMaker iOS SDK |
Text | 8.3 | Yes | Yes | Yes | Yes | Yes |
Parameters
Parameter | Description | Example value |
---|---|---|
Text | The text to process. | "Hello World" |
StyleTemplate | Optional The styled text to use as template for line numbers. We only use style for the nubers and text is ignored. If empty, this parameter is ignored. |
TextFont("test"; "Courier"; "") |
Delimiter | Optional The optional delimiter. Default are two space characters. |
": " |
Result
Returns text or error.
Description
Adds line numbers to text.Preserves the styles in the text and adds line numbers as prefix.
Depending on how many lines we have, we may use 2 to 6 digits for numbers.
Works fine for JSON, XML, JavaScript, HTML or any other text.
See also XML.Format & JSON.Format to format and XML.Colorize & JSON.Colorize for colors.
Examples
Format, colorize and apply line numbers:
MBS( "Text.AddLineNumbers";
// colorize it
MBS("JSON.Colorize";
// format before colorize
MBS( "JSON.Format"; JSON Input)
);
// define which style to use for numbers
TextColor (
TextFont ( " "; "Courier" );
RGB ( 0 ; 0 ; 255 )
)
)
See also
Example Databases
Blog Entries
- Neues MBS FileMaker Plugin 8.3
- MBS FileMaker Plugin 8.3 released
- MBS FileMaker Plugin, version 8.3pr1
- Colorize JSON or XML in FileMaker with line numbers
Created 27th May 2018, last changed 5th July 2018
TAPI.Unpark - Text.AppendTextFile
Feedback: Report problem or ask question.
Links
MBS FileMaker Plugins