Genx Posted May 17, 2006 Posted May 17, 2006 Umm, yeh, my get(filename) function doesnt seem to be returning the filename. It's a bit of a pain having to type it out when im trying to get value list items in... Just wondering if anyone else has this problem FM8 Advanced, v8.03
Søren Dyhr Posted May 17, 2006 Posted May 17, 2006 And the field is unstored?? Get( functions doesn't freshen in indexed/stored fields ...but you know that don't you? --sd
Wim Decorte Posted May 17, 2006 Posted May 17, 2006 No issues here. Can you expand a bit further: local file, hosted file, ... what is returned? Maybe post your calc or your script. Can you see the result in the data viewer?
Genx Posted May 17, 2006 Author Posted May 17, 2006 My get value list items function wasnt working with Get(filename) so i decided to test it in the data viewer... no luck. The file is the client side (front end) of a solution - i tested it with a local file, this works. I also tested it with the front end (while not connected to the network) and pointed to a very recent version of the backend but locally --> this also worked. Perhaps it has to do in something to do with remote backend (this was tested over a vpn though it shouldnt matter). If someone else could test this it would be great... its just a bit of a pain having to type in the whole filename. Cheers, ~Genx
Genx Posted May 17, 2006 Author Posted May 17, 2006 Okay update, i tried it on a different computer and it seems to work. I think i might have to re-install FileMaker. Cheers guys, ~Genx
Søren Dyhr Posted May 17, 2006 Posted May 17, 2006 Just to get the facts straightned slightly, what you attempted to do was similar to this: Show Custom Dialog [ Title: "Which list..."; Message: "....do you wish to get data from "; Buttons: “pling”, “ Clone” ] Set Field [ pling::reciever; ValueListItems ( GetValue( DatabaseNames ; Get ( LastMessageChoice ) ) ; "New Value List" ) ] ...my point would have been that if a file isn't referenced by the subscriber file won't it show up in list "DatabaseNames" makes. --sd
MarkWilson Posted May 17, 2006 Posted May 17, 2006 I experienced a similar problem with the Get(filename) in a valuelist function. I also run FM8A on an XP box. I was able to trigger the calculation by concatenating additional info into the function. Once it was working again I replaced it with the origianl formula and it has worked without flaw ever since. I am not ready to call it a bug, but it is on my suspect list.
Genx Posted May 17, 2006 Author Posted May 17, 2006 What was the additional info you concactenated into it? Because i was just trying the raw Get(FileName) function.
MarkWilson Posted May 17, 2006 Posted May 17, 2006 Genx, ValueListItems ( Get ( FileName ) & ".fp7" ; "ValueList" ) I realize this is not required, but it did trigger the calculation to work. Once it was working I removed the ".fp7" and have not had any trouble since.
Genx Posted May 17, 2006 Author Posted May 17, 2006 Yeh, that worked perfectly, but its not working if remove the .fp7 extension but its all good, thanks Mark! ~Genx
Genx Posted May 17, 2006 Author Posted May 17, 2006 If anyone else comes accross this problem, you can a) use the solution above (and because im too lazy i did) :P you can make a custom function or just a calc to parse out the filename from get(filepath) function.
MarkWilson Posted May 18, 2006 Posted May 18, 2006 Is there a Mac user out there who could test these formulae? ValueListItems ( Get ( FileName ) & ".fp7" ; "ValueList" ) vs. ValueListItems ( Get ( FileName ) ; "ValueList" ) My thought is the file extention not being required on a Mac as it is on PC.
Genx Posted May 18, 2006 Author Posted May 18, 2006 hold on, have you got view file extensions of known file types turned on in your control panel under view options... because i do, and i think that might be it.
Genx Posted May 18, 2006 Author Posted May 18, 2006 Okay, well i just turned it off and tried it... no luck, oh well
Vaughan Posted May 19, 2006 Posted May 19, 2006 I believe the Get(filename) function mis-handles file names with periods (.) in them. It stops at the first period. So a file named "class_contacts.fp7" will return the expected result, but "class.contacts.fp7" will not. This might be considered a bug in the function, but who in their right mind puts periods in file names? :
Genx Posted May 19, 2006 Author Posted May 19, 2006 Sorry, wait... yes i do. Thats just cause it was Filename v2.0.fp7 .. as per whether a sane person would do it, apparently microsoft thinks so otherwise it wouldn't allow the character to be used...
Oldfogey Posted May 19, 2006 Posted May 19, 2006 The fact that Microsoft allows something is no indication of its sanity. It is just generally bad practice to use symbols, names or anything elses that have special meanings/uses. You can often get away with it for ages and suddenly it will bite you.
Genx Posted May 19, 2006 Author Posted May 19, 2006 Yet still, FM was built to be compatible with Windows so therefore it should support filenaming standards that windows supports - whether these are sane or not, it is not for FM to judge.
John Mark Osborne Posted May 20, 2006 Posted May 20, 2006 There is a great resource on the filemaker.com web site called the "FileMaker Development Conventions". Over a dozen of the best developers in the FileMaker market got together and defined good standards for fields, tables, files, scripts, etc. It's quite specific at nearly 100 pages but is worth a read to at least start your own system of standards. In the section on file naming standards, there are 10 important points everyone should follow when naming a FileMaker file. Here are two of the points from the white paper: 4. Should NOT use file name to indicate versions. 5. Should NOT contain periods other than the single period used for the extension. If you would like your own copy of the "FileMaker Development Conventions", visit the following URL: http://www.filemaker.com/downloads/pdf/FMDev_ConvNov05.pdf
Genx Posted May 20, 2006 Author Posted May 20, 2006 Oh well, i'm a bit un filemaker developer convention comformist... i'll have to take this in to account in future but at the moment i have to stick with what i'm using for the plain reason that i reference the filename indirectly in a few spots in the database and i don't want to induce any unwarranted bugs into my system from calcs that don't evaluate properly anymore. Anyway, cheers, i'll make sure i have a good read through it when i get some time.
Genx Posted May 20, 2006 Author Posted May 20, 2006 Oh right, also, its not really indicating a version number per say, i.e. i don't change it on updates. V1 was just a hunk of junk so i rebuilt it and named the whole thing version 2. Though i suppose it could have done without the period-zero.
Razumovsky Posted May 22, 2006 Posted May 22, 2006 I have experienced a similiar problem, but did not have the double dots in the filename. Started working fine again before I could figure it out. See this thread here for details. -Raz
Recommended Posts
This topic is 6759 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