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

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

Recommended Posts

Posted (edited)

I'm trying to replace data in a field after inputing records, however it updates all the records in the database. Here is my code:

Show All Records

Import Records [ ]

If[Get(FoundCount) > 0]

Go to Record/Request/Page

[ First ]

Go to Record/Request/Page

[ First ]

Freeze Window

Loop

Set Field [ Marketing::Group Name; Setup::Group Name ]

Go to Record/Request/Page[ Next; Exit after last ]

End Loop

End If

Refresh Window

What am I missing?

Edited by Guest
Posted

Do you mean after "inputing" records?

What kind of import are you doing? Does it result in the found set being all records?

Posted

I'm importing new records to a table and trying to set a value into one field. As I understand it the import function creates a found set which I should be able to manipulate without affecting the rest of the records. I tried using Auto Entry with calculated values but no luck there either it updated all records!

Posted

Importing records should give you a found set of just the imported records. If you do have Advanced, you can use the Script Debugger to step through and see if you have that found set.

If that's not happening we'll need more details.

You can use the Replace[] script step on that found set rather than a Loop/End Loop and Set Field[].

Another option, if the import is coming from a FMP table, is to create a global field in the source table, set that to the value you're looking to replace, and import it instead.

Posted

DJ, The import is coming from a csv file and it is creating a found set. I tried using replace but same results. I can print the found set just fine. What I'm trying to do is allow the user to input a value to describe the set of imported records and insert this value into each record. Maybe I need to use a master/detail scheme instead.

Posted

If the import is creating found set, then the Replace[] should work on just that found set. There's something you're missing. Can you post a sample file?

I don't know what you mean by master/details scheme.

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