May 17, 200619 yr 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
May 17, 200619 yr And the field is unstored?? Get( functions doesn't freshen in indexed/stored fields ...but you know that don't you? --sd
May 17, 200619 yr 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?
May 17, 200619 yr Author 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
May 17, 200619 yr Author 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
May 17, 200619 yr 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
May 17, 200619 yr 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.
May 17, 200619 yr Author What was the additional info you concactenated into it? Because i was just trying the raw Get(FileName) function.
May 17, 200619 yr 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.
May 17, 200619 yr Author Yeh, that worked perfectly, but its not working if remove the .fp7 extension but its all good, thanks Mark! ~Genx
May 17, 200619 yr Author 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.
May 18, 200619 yr 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.
May 18, 200619 yr Author 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.
May 19, 200619 yr 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? :
May 19, 200619 yr Author 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...
May 19, 200619 yr 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.
May 19, 200619 yr Author 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.
May 20, 200619 yr 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
May 20, 200619 yr Author 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.
May 20, 200619 yr Author 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.
May 22, 200619 yr 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
Create an account or sign in to comment