April 17, 20232 yr Hi all, I'm working on a simple import from CSV script, and the issue I'm running into is in trying to show only my just-imported records as the found set so that I can perform some other operations on them. Normally when I import records manually, FM will omit all current records and import my new file... the just-imported records will be my found set. Performing this operation within a script seems to be different? It seems to omit the omit step – when I perform my Import Records all previously shown records are still shown. If I add "Show All Records" and "Show Omitted Only", when I then perform my import those records then become omitted and I now have no records at all to work with?! I don't recall this behavior in my FMP10 days, I'm in v.18 right now. Is this behavior expected? I could perform a search for all of the just-imported records but that seems like it should not be necessary?! Edited April 17, 20232 yr by RRS
April 17, 20232 yr There is no difference. Immediately after importing records, the found set contains only (and all) the imported records. If at the end of your script your found set is different, then something additional has happened after the import. Perhaps you have extra steps in your script. Or maybe another script gets triggered. You can use the script debugger to find out when this happens.
April 17, 20232 yr Author 1 hour ago, comment said: There is no difference. Immediately after importing records, the found set contains only (and all) the imported records. If at the end of your script your found set is different, then something additional has happened after the import. Perhaps you have extra steps in your script. Or maybe another script gets triggered. You can use the script debugger to find out when this happens. I am using the debugger. Maybe there is something wrong with my install? Here's a video showing the issue: https://www.loom.com/share/97dbaee5ab9d494291847815dc6370b4
April 18, 20232 yr 4 hours ago, RRS said: Maybe there is something wrong with my install? I doubt that very much. 4 hours ago, RRS said: Here's a video showing the issue: https://www.loom.com/share/97dbaee5ab9d494291847815dc6370b4 I am afraid that doesn't tell me anything useful. See if you can reproduce the problem (and only the problem) in a new file. If so, post the file here.
April 18, 20232 yr Author 14 hours ago, comment said: I doubt that very much. I am afraid that doesn't tell me anything useful. See if you can reproduce the problem (and only the problem) in a new file. If so, post the file here. Well, in creating the test file for you I figured it out. The import step in the script was referencing the wrong table instance. I was sure it'd be something simple like that. Thanks for helping me figure it out, in a roundabout way! Edited April 18, 20232 yr by RRS
April 18, 20232 yr 43 minutes ago, RRS said: in creating the test file for you I figured it out. That happens more often than not. Keep it in mind, it's a good troubleshooting technique - see also: https://en.wikipedia.org/wiki/Rubber_duck_debugging
Create an account or sign in to comment