
Image Filed
I have asked the question before but thought I would try once more as I keep going back to the same solutions that will not work.
My question is to try and open a specific pictures held in a folder on the C drive of my computer, I have a field that holds the data referencing the name of the picture/Pictures like 6007.tif being one of the picture names.
Under the above filed is a ImageField with the Derivation -
if ( image = blank ,"NIS.tif", concat( FileType ,".tif"))
Unfortunately the image filed is never blank just getting a number that does not exist, so get error message "Could Not Find File 1234.tif Please specify image path" .
What I need to do is if picture 1234.tif is not on the computer, it brings up an Image like, NO IMAGE STORD .tif
If image 6007.tif is stored in a folder on the C drive the picture will display.
Any Help Please … If not any place I may be able to get help.
I have tried to add a test program if it helps :
Did not attach on first attempt .
In DE6 you need to use the CDF FileExist to check if the image exist before you open it, if it doesn't you open your default image.
You also need to use full path i.e. "C:\depics\Image.tiff" rather than just image name and rely on imagepath in Preferences as filexists won't relate to imagepath. Using imagepath in Preferences is a very "Old fashoned" and unrelaiable way as you have to updated it manually rather than doing via the app.
You are punishing yourself by trying to move forward in a what can only be said is a dark ages version of DataEase so limitted in function and functionality.
Attached is your sample converted to LE9 where we use the inhouse functions in DEOS() (DataEase Operating System).
https://books.dataease.com/viewdocument/?BookPrefi...
You can download a trial version of LE9 here
Thank you very much for sorting this, I would really like to upgrade to LE9, unfortunately the LE6 version we use as you know is very old, I have just tried to convert it to LE9 - and the amount of CDF errors I get along with some of the tricks that we have been doing, I don't think would work. To get things working correctly I think would take us so long to sort out.
Could I just ask how should this code be written in DE6 if it is even possible
if (DEOS("@FileExists",concat(".\DePics\",ConcatMaterialCode))="yes", concat(".\DePics\",ConcatMaterialCode),".\DePics\NoImage.tif"))
I have tried, but the dataease expert we used in the passed has now retired and no longer undertakes programing work, I have been teaching myself for the last few years but admit I do struggle with the more complicated parts, that cant be copied from his old programs.
I will keep trying with the conversion, allowing us to upgrade but its going to take along time, Do you offer the conversation service if so how do we get a costing for that.
The CDF's should work the same in LE9 as in LE6 but you might have to copy the libraries used from where they are installed in your DE6 installation.
The best way to migrate is go via DE8 and then move to LE9 from there as the testing is always against the previous version so do everything in one big jump might cause extra problems.
If you need assistance we can help you in moving the app and checking what the problems are. We only charge for the time consumed and we can put a limit etc. on the spending.
Thanks' for the information - I am getting to grips with LE9 now, starting to get things working before taking the next step in purchasing if all goes as well as its looking so far, are you able to help with this situation
define "act1" text .
Act1 := RecordSaveNew () .
I have this is quite a lot of places in LE6 that works great in the OML but in LE9 for some reason it will not save the record correctly , if its on record 0001 and its saved the next time you go into the form its jumped to 0006 and not 0002 as it should ? I'm using it to basically save 0001 as soon as you enter the form Under ValueChanged option ?
If its easier I can forward a small demo ?
Re:Re:Re:Re:Re:Re:Re:Image Filed
if (DEOS("@FileExists",concat(".\DePics\",JoinCode )) ="yes", concat(".\DePics\",JoinCode ),".\DePics\NoImage.tif")) NOT WORKING
if (DEOS("C:\FileExists",concat(".\DePics\",JoinCode )) ="yes", concat(".\DePics\",JoinCode ),".\DePics\NoImage.tif")) NOT WORKNING
if (DEOS("C:\DePics , FileExists",concat(".\DePics\",JoinCode )) ="yes", concat(".\DePics\",JoinCode ),".\DePics\NoImage.tif")) NOT WORKING
if (DEOS("@FileExists",concat("C:\DePics\",ConcatMaterialCode))="yes", concat("C:\DePics\",ConcatMaterialCode),"C:\DePics\NoImage.tif")) NOT WORKING
Just don't understands that something that works so well in LE9, and I know should be very easy to reproduce in LE6, is so hard to figure out.
Does Dataease offer a pay as you go service for problems like this, will be upgrading to LE9 but need to get this resolved in LE6 before I can start allowing time for upgrading.
Re:Re:Re:Re:Re:Re:Re:Image Filed
Putting RecordSaveAsNew() on a ValueLoaded event is not a good idea.
THe problem here is most likely that the event is called more than once and I'm pretty sure it will be called when you save a NewRecord so this is something that need to be avoided.
Re:Re:Re:Re:Re:Re:Re:Re:Image Filed
You can't use DEOS in LE6 as it doesn't have the function.
Almost everything in DE6 had to be resolved with CDF's when in DE9 you don't have to resort to use CDFs for almost anything.
The function library in DE9 is 10 times bigger than in DE6.
Re:Re:Re:Re:Re:Re:Re:Re:Image Filed
Yes, we do offer a PayAsYou go service. You can find the prices and services in the SHOP under Services.
All the best.
Re:Re:Re:Re:Re:Re:Re:Re:Re:Image Filed
Perfect - your demo Written by DataEase 31/10/23 at 11:17:44 was for LE9 that's how I want it to work but in LE6
if (DEOS("@FileExists",concat(".\DePics\",JoinCode )) ="yes", concat(".\DePics\",JoinCode ),".\DePics\NoImage.tif"))
would the above code to be written to work in DE6 be covered by your "Quick Support Incident" or "Support Incident" I don't know what one to add to cart ?
Re:Re:Re:Re:Re:Re:Re:Re:Re:Re:Image Filed
Sen d us the application and what it is you want fixed and we will give you a quote on the time.
It can't be done exactly the same as the functions aren't available in DE6 but we can achieve the same result with other functions.
Re:Re:Re:Re:Re:Re:Re:Re:Re:Re:Re:Image Filed
This was the file I sent before, and your chap got it done but in LE9 , as discussed I just need the same but in LE6, the program I want it working in is very large and been added to over decades , but if you can get it working in the attached I can copy and past it over. Thanks Again.
OK! We will have a look and get back to you.
All the best.
Hi again.
We have had a quick look at it and if the job is simply to make the sample work in LE6 this will be covered by support Incident.
Thanks Again , I have paid it on line :
Dear Raymond.
Your problem was a little harder to resolve in LE6 than anticipated as the CDF?s that was supposed to do the deal ?misfired? i.e. they worked the first time but after that they would return the previous value … most likely a bug but a little late to fix in a library that was developed 30 years ago…
However we managed to work around it by not checking if the file exist but if its bigger than 0…
It works fine and the good news is that it is a CDF that is shipped with LE6.
I think you will find that working in LE9 is much more appreciative than working in LE6…I?ve almost pulled my hair out (if I had any).
Derivation in Image:
if (GetSizeOf(concat("C:\DEPics\",ConcatMaterialCode) ,"N") > "0", concat("C:\DEPics\" , ConcatMaterialCode ) , "C:\DEPics\NoImage.tif")
Thank you so much - I cant wait to get home and test it, I have been trying for weeks - even months over a period of time day's here and there, I know about your hair after this, mine is nearly gone, I really would like to upgrade to LE9 but at first my test were going well, then come across a simple little thing that I have used in LE6 so much that works great but In in the Copy of 9 I have, that I dont know if it's LE9 or DE9 downloaded, it just will not work, I need that "Stay Behind" version spoke about some time back
define "act1" text .
Act1 := RecordSaveNew () .
In LE6 that works great in the OML but in LE9 for some reason it will not save the record correctly , if its on record 0001 and its saved the next time you go into the form its jumped to 0006 and not 0002 as it should ? I'm using it to basically save 0001 as soon as you enter the form Under ValueChanged option
Im going to keep trying, but what ever I get working needs to be very simple change as its in so many places.
Thanks Again , anything like problem solved I will contact you first in future rather than me wasting my time.
Quck question it states not a back up path when trying to restore : how can I open it ? I have some free time in the office ....
Its a full app and not a backup. Just unzip it and open it.
Re:Re:Re:Re:Re:Re:Re:Image Filed
Thaks fore comming back, did try that unzipped it, and when trying to open it this ois all I get no program I can see ?
When it comes to events things are quite different between LE6 and LE9 and also from DE6 to DE7 to DE8.
The ValueLoaded() and ValueChange() events was called as the same while the ValueLoaded() now is called when you open a new record and first time load the value and ValueChange() when its changed.
I'm not completely sure what you try to achieve but I'm sure there is a better way as firing RecordSaveAsNew() on an event is quite dangerous as you could end up in in a loop etc.
I suspect that what happens is that you are in a loop and the actual save of the new record is only done after the 4th increment as Windows work with messages etc.
The way it worked in DE6 is the "bug" wo if you want to use LE9 you will have to find a different way to achieve this.
Re:Re:Re:Re:Re:Re:Re:Image Filed
OK will keep trying different things to get it working somehow, once I have got this image problem solved in LE6 I can then work full time on LE9,
hopefully I can get this ImageTestProgram opened somehow - once unzipped , I cannot seem to see the program to open:
Re:Re:Re:Re:Re:Re:Re:Re:Image Filed
Sorry. Rocky mistake...
I zipped the file without closing it in LE6 so the RDRR file was locked.
You can do this without problem in LE9 so we are not used to it anymore...
New copy attached.
Re:Re:Re:Re:Re:Re:Re:Re:Re:Image Filed
No problem, its good to know the experts make mistakes as well as us novices , just done a very quick test at the office and it seems to work FANTASTC, just as needed Thanks for your efforts , will test fully at home