Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6462 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Name & Parameters: [color:red][big] LineNumbering ( text ; start ; suffix ) [/big]

Description: LineNumbering custom function

Author: Daniele Raybaudi

Format: LineNumbering ( text ; start ; suffix )

Parameters:

text - the text that we want to view with numbered lines

start - the number that we want to start from ( tipically 1 )

suffix - the string that we want to add to each line number ( minimum 2 chars ! )

Returns the given text with numbered lines

You can:

1. add one ore more new lines

2. break one or more lines

3. modify one or more lines

4. delete one or more lines

5. the max number of lines is 999

Sample Input:

Example with Text =

aaaa aaa

bbbbb bb

ccc cccccccccccc

LineNumbering ( Text ; 1 ; ". ") inserted as an option calc of an Auto-Enter/Replace text field

Results:

1. aaaa aaa

2. bbbbb bb

3. ccc cccccccccccc

Recursive: yes

Formula:

/*

LineNumbering custom function



Author: Daniele Raybaudi



Format: LineNumbering ( text ; start ; suffix )



Parameters:

text - the text that we want to view with numbered lines

start - the number that we want to start from ( tipically 1 )

suffix - the string that we want to add to each line number ( minimum 2 chars ! )



Returns the given text with numbered lines



You can:



1. add one ore more new lines

2. break one or more lines

3. modify one or more lines

4. delete one or more lines

5. the max number of lines is 999



Example with Text = 

aaaa aaa

bbbbb bb

ccc cccccccccccc



LineNumbering ( Text ; 1 ; ". ") returns:

 1. aaaa aaa

 2. bbbbb bb

 3. ccc cccccccccccc



03/16/2007



*/



Let([

prefix = "	";// this a CTR + TAB char

line = Trim ( Substitute ( GetValue ( text ; 1 ) ; prefix & GetAsNumber ( Left ( Text ; 4) ) & suffix  ; "" ) ) ;

next = Substitute ( RightValues ( text ; ValueCount ( text ) - 1 ) ; prefix & GetAsNumber ( Left ( Text ; 4) ) & suffix ; "" )

];

prefix & start & suffix &

Case(

Length ( next )  ;  line & ¶ &  LineNumbering ( next ; start + 1 ; suffix ) ;

line

)

) 

Required Functions: none

Author(s):) raybaudi

Date: 03/16/07

Credits:

Disclaimer:

FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify.

This topic is 6462 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.