Colin Greene Posted April 4, 2008 Posted April 4, 2008 Can anyone help? Fairly newbie so apologies if the script is a bit chunky. My database has several image containers linked to text fields with the file name. The AutoCalculation function in each container is: "imagewin:/"& $$id &"/"& Image_ID &".jpg" (Image_ID is the text field). The container result should look like “imagewin:/D:/EUKL/FILEMAKER/Images/0003166.jpg”. When I import my database records from xls I run the script below to activate the image links. My problem is some links work and other are missed, although when I edit each missing link text record the link is established. Is this a timing issue and any ideas how I can shorten this script? The 'if' function is to ignore blank cells which cause an error message. I also have another issue which maybe a simple script line: When I import the xls records I opt not to calculate any fields as the ID_Record number, Date_created etc already exist. However any internal calculated fields are of course blank and I need to ‘calculate’ each record before the loop moves to the next record. Go to Record/Request/Page [First] Set Variable [$$ID; Value:"D:/EUKL/FILEMAKER/Images"] Set Variable [$$Block; Value:"D:/EUKL/FILEMAKER/Image Block"] Set Variable [$$Logo; Value:"D:/EUKL/FILEMAKER/Image Logo"] Loop If [not IsEmpty(ID_Card_eukl::Image_ID)] Set Variable [$f; Value:${ID_Card_eukl}:Image_ID & ".jpg"] Go to Field [iD_Card_eukl::IMAGE] Insert Picture [Reference; f Else Clear [select] End If If [not IsEmpty ( ID_Card_eukl::Image_Top )] Set Variable [$top; Value:${ID_Card_eukl}::Image_Top & ".bmp"] Go to Field [iD_Card_eukl::IMAGE_TOP1] Insert Picture [Reference; top Else Clear [select] End If Set Variable [$side; Value:${ID_Card_eukl}::Image_Side & ".bmp"] If [not IsEmpty(ID_Card_eukl::Image_Side)] Go to Field [iD_Card_eukl::IMAGE_SIDE1] Insert Picture [Reference; side Else Clear [select] End If Set Variable [$logo; Value:${ID_Card_eukl}::Image_Logo1& ".jpg"] If [not IsEmpty(ID Card eukl::Image Logo1)] Thanks
Recommended Posts
This topic is 6077 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