October 29, 200322 yr Hi, I've seen this script in action, but do not know how to create it. I want to add the same text information to a field in every record in a specified search. What I want to do is specify the field, have an empty box open into which I can type the text I want to add, hit go and have that text show in the same field on every record (without overwriting any existing text) Any ideas? Thanks.
October 29, 200322 yr This was discussed in a thread earlier. Another option to the one given is to set up a calculated field that is a conglomeration of all searchable fields in the table. Field1 & "|" & Field2 & "|" & Field3, etc. Then have your patrons search in this field for all relevant results.
October 30, 200322 yr Author I appreciate the reply, but I don't think it addressed my need. I tried the link to the other thread you referred to and it also had to do with searches, which is not my issue. Can anyone suggest a way to be able to enter new text into a field in multiple records? After executing a Find resulting in some 800 records I want to be able to drop the same text into the same field of each record in one fell swoop rather than having to painfully copy it to each record individually. Help!
October 30, 200322 yr how about FreezeWindow Loop Set Field [theField, theField & gText] Go To Record [Next, exit after last] end loop Dj
October 30, 200322 yr skemper said: I want to add the same text information to a field in every record in a specified search. Sure as heck sounds to me like a multiple Find request. Try typing what you mean, and meaning what you type. It makes helping you much easier.
October 30, 200322 yr Author Thanks DJ, I think I am getting closer. Here are my steps: Freeze window Insert text (field specified, I enter specific text to box) Go to record(next, end at last) End loop This works, but would be more functional if I didn't have to go back into the script each time I wanted different text in the field. Also, and this is a small item, is there a way to get the text to start on a new line rather than the first immediate space after text that already exists in the field? I forced it to do this by creating empty lines in the specify text box to get it to place the text below existing lines. Thanks for the thoughts. Scott
October 30, 200322 yr DJ suggested Set Field [ ], not Insert Text [ ]. gText is a global text field where you would enter whatever the specific text is at that moment. Then Set Field ["Fieldname", "Fieldname & "
October 30, 200322 yr Author Ok, thanks for the 101 class on this. Something is unacceptable the way I am entering into the Specify Field option. My field name is Promos Sent, so I enter Promos Sent &
October 30, 200322 yr Author Here is exactly what I put into the Specify Calculation box after specifying the field as Promos Sent. Promos Sent & "
October 30, 200322 yr Which field is highlighted after you click OK? That's the one that is causing you grief. Do you have a gText field?
October 30, 200322 yr Author You are dead on. The gText is highlighted. I originally set the field up as "Text". Do I need to change it to "Global" instead? It appears that I will loose all existing data in the field if I change it now. Your thoughts? SK
November 6, 200322 yr It sounds like FM is squawking at you because you haven't created a global field called gText. There are good reasons to create a global field to do this, namely that it allows the text you intend to insert to be changed on the fly, but if that isn't a requirement, you can just hard code the text. Give this a try: FreezeWindow Loop Set Field [TargetField, TargetField & "
November 11, 200322 yr Hi skemper, What you are looking for (if I understand you correctly) is a tool that will allow you to perform a find... prompt the user to enter a piece if data that will be 'appended' to the END of the existing data within a field... ONLY on the found records. This being true... here's a possible solution... Create a script... - perform a find (using a customized find solution or FMP default find) -- they enter data in a field [tNAME] and click continue -- FMP finds all records that match - prompt user for new data input (using a costomized data entry screen) -- they enter the data into a global field [gDATA] and click continue - perform a 'calculated' REPLACE that will use the existing contents of the [tName] field and adds the 'return' character and the contents of the [gDATA] field <<< Calc = tNAME & "
November 11, 200322 yr skemper ... Here's a demo of the general method people have been describing in their posts. In my example, I used ", " to separate the values in the text field. This is because I'm displaying the results in list format, so it's easier to see the result of adding text to existing text in the field. You can just as easily use the " Insert_Text.zip
November 17, 200322 yr Do you a field named "Promos Sent" and a field named "gText"? Which field is highlited when you get the error message?
November 27, 200322 yr Hi skemper, Oh, so many wonderful suggestions! And these guys know their stuff - it's just that sometimes, communicating this way can be difficult. I'll bet you are quite confused and maybe I can pull this together for you. What you are requesting: That a standard text field (Promos Sent) be appended (set with it's existing data PLUS, on the next line, additional text that you specify on the fly) through an already Found Set of records. Here are the exact steps as I understand it: 1) Create a global (text) field in Define Fields called gText. This is why you were getting the errors - the field didn't exist yet. 2) You need to get the text into this global field before you run the script. If you have FM vs. 6, you can use Show Custom Dialog (under script steps Miscellaneous section - probably at the bottom). If not, place this global field on a layout and, in Browse mode, type the text you want to insert into each record. You can change this text whenever you wish. 3) Then (without Custom Dialog) the script would be (after isolating your found set): Go To Record/Request/Page [First] Loop Set Field [Promos Sent, Case(IsEmpty(Promos Sent), gText, Promos Sent & "
Create an account or sign in to comment