April 18, 201114 yr 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
April 18, 201114 yr 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 ) ) ]
April 18, 201114 yr 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
October 6, 201510 yr 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?
October 6, 201510 yr 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 ) ; "" ) )
Create an account or sign in to comment