July 5, 201015 yr 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, 201015 yr by Guest
July 5, 201015 yr Do you mean after "inputing" records? What kind of import are you doing? Does it result in the found set being all records?
July 5, 201015 yr Author 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!
July 6, 201015 yr 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.
July 6, 201015 yr Author 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.
July 6, 201015 yr 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.
Create an account or sign in to comment