MachineMan Posted April 18, 2011 Posted April 18, 2011 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
Raybaudi Posted April 18, 2011 Posted April 18, 2011 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 ) ) ]
MachineMan Posted April 18, 2011 Author Posted April 18, 2011 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
Newbies artdoc Posted October 6, 2015 Newbies Posted October 6, 2015 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?
eos Posted October 6, 2015 Posted October 6, 2015 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 ) ; "" ) )
comment Posted October 6, 2015 Posted October 6, 2015 I get told I ned an equal sign! Could you post a screenshot of that?
Recommended Posts
This topic is 3354 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 accountSign in
Already have an account? Sign in here.
Sign In Now