Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Remove first line of text from field

Featured Replies

is there a way setup a button to delete the first line of text in a field?

I have a field on my layout that I parse address info from into the corresponding fields in my database.

after I parse the text I'd like to click a button and delete the line of text from my copypaste field I just want to remove the first line of text without having to manually highlight the text then delete it. I'ts actually going to be removing the top 6-10 lines but I figure I can have it repeate or just press the button a couple times if I need to remove more than one line.

I tried a Trim function and replace but the text varies each time so it's not always a set number of characters

Thanks

Thomas

If there is a carriage return between your lines of text, than you could use:

Set Field [ YourTable::YourField ;

Let([

t = YourTable::YourField ;

c = ValueCount ( t ) ;

v = MiddleValues ( t ; 2 ; c - 1 )

];

Left ( v ; Length ( v ) - 1 )

)

]

  • Author

If there is a carriage return between your lines of text, than you could use:

Set Field [ YourTable::YourField ;

Let([

t = YourTable::YourField ;

c = ValueCount ( t ) ;

v = MiddleValues ( t ; 2 ; c - 1 )

];

Left ( v ; Length ( v ) - 1 )

)

]

that worked exactly the way I wanted it too THANK YOU VERY MUCH

Thomas

  • 4 years later...
  • Newbies

I copied this and was creating the script, but when I included exactly what is shown here I get told I ned an equal sign! In the silly way FM gives the advice, it doesn't say where! What needs to be added, please?

 

I copied this and was creating the script, but when I included exactly what is shown here

The calculation is correct. You are aware that in Set Field[], this

YourTable::YourField

is the field to be selected, and that

Let ( [ 
  t = YourTable::YourField ;
  c = ValueCount ( t ) ;
  v = MiddleValues ( t ; 2 ; c - 1 )
  ] ;
  Left ( v ; Length ( v ) - 1 )
)

is the result calculation to be specified?

btw, you can also try

Let ( 
  t = YourTable::yourField ; 
  Replace ( t ; 1 ; Position ( t ; ¶ ; 1 ; 1 ) ; "" )
)

 

I get told I ned an equal sign!

Could you post a screenshot of that?

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.