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

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

Recommended Posts

Posted

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. confused.gif 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) grin.gif Any ideas? Thanks.

Posted

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.

Posted

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!

Posted

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.

Posted

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

Posted

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 & "

Posted

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 &

Posted

Which field is highlighted after you click OK? That's the one that is causing you grief. Do you have a gText field?

Posted

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

Posted

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 & "

Posted

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 & "

Posted

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

  • 2 weeks later...
Posted

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. crazy.gif

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 & "

This topic is 7670 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.