RLP Posted July 5, 2010 Posted July 5, 2010 (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 July 5, 2010 by Guest
bruceR Posted July 5, 2010 Posted July 5, 2010 Do you mean after "inputing" records? What kind of import are you doing? Does it result in the found set being all records?
RLP Posted July 5, 2010 Author Posted July 5, 2010 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!
David Jondreau Posted July 6, 2010 Posted July 6, 2010 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.
RLP Posted July 6, 2010 Author Posted July 6, 2010 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.
David Jondreau Posted July 6, 2010 Posted July 6, 2010 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now