asterix Posted August 30, 2021 Posted August 30, 2021 (edited)  I have a question, and perhaps someone may have a answer (solution). 🙂 I have an application where images are imported using script. Images are imported in the Container field, named [Image]. In another field named [FileName] is where the image filename including the file format is been stored (extracted by calculation upon import). There are several criteria required (file format, among other things.), therefore, images that do not meet the criteria are not imported. The question is: Is there any way to capture and display the file(s) name(s), incl. the file format, of not imported images i.e. “Total records skipped due to erros:” ? Thank you in advance. Edited August 30, 2021 by asterix
comment Posted August 30, 2021 Posted August 30, 2021 19 minutes ago, asterix said: There are several criteria required (file format, among other things.), therefore, images that do not meet the criteria are not imported. How exactly is this accomplished? Do you have validation in place? -- P.S. Please use the default font when posting. Â
asterix Posted August 30, 2021 Author Posted August 30, 2021 Yes, I have validation. PS! I import folder containing the images.
comment Posted August 30, 2021 Posted August 30, 2021 I don't know of a way to read data from non-existing records. If you need the names of the files that do not pass validation, then I would suggest you start by importing all of them, then delete the ones that do not meet the criteria. Or import them into a temp table first, then import from there into your target table, using validation only on the second step. Alternatively you might be able to use an OS-level script or a plugin to get the contents of the folder and compare it to the list of imported files. Â Â 1
asterix Posted August 30, 2021 Author Posted August 30, 2021 I thought as much. Your suggestion to import them into a temp table sounds logical and achievable. Worth giving it a try. I'll give it a try. Thank you very much
asterix Posted August 30, 2021 Author Posted August 30, 2021 I've tried it and it works rather good. First imported only a reference of each image file and the FileName in the temp table. Thereafter imported the images into the Container table. In the temp table have created a calculation field named "NotValid_files", the calculation is: FileName ≠Container::FileName = "1" In find mode, all not equal file names (the ones not validated in the Container table) are easy to find. Briliant suggestion. Thanks 👍 🙂🙂
comment Posted August 30, 2021 Posted August 30, 2021 (edited) 9 minutes ago, asterix said: the calculation is: FileName ≠Container::FileName = "1" The last part  = "1"  is an unnecessary complication. The result of the first comparison is already either 1 or 0.  Edited August 30, 2021 by comment 1
Recommended Posts
This topic is 1251 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