Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6759 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

And the field is unstored?? Get( functions doesn't freshen in indexed/stored fields ...but you know that don't you?

--sd

Posted

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?

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

What was the additional info you concactenated into it? Because i was just trying the raw Get(FileName) function.

Posted

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.

Posted

Yeh, that worked perfectly, but its not working if remove the .fp7 extension but its all good, thanks Mark!

~Genx

Posted

If anyone else comes accross this problem, you can a) use the solution above (and because im too lazy i did) :P :P you can make a custom function or just a calc to parse out the filename from get(filepath) function.

Posted

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.

Posted

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.

Posted

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? :

Posted

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...

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.