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

Cannot get ValueListItems to appear


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

Recommended Posts

Posted

I am using a calculation field that is (text) as follows: "Unavailable:¶" & ValueListItems(Get(FileName); "Count")

I cannot get ANY value list to appear in this field - even with a simple calculation as follows:

ValueListItems(Get(FileName); "Count")

I have this exact same calculation in another File (and it works fine) but for some reason this does not work in this file. I have spent an entire day attempting to figure out the problem!

Any ideas?

Posted

try "count.fp7"

:confused::why:

The second parameter is for the value list name, not the filename

Posted

Check to see that your calc field is text. Most likely it is a number result.

Posted

You are correct - the second parameter is for the value lsit, not the file.

I did check the calculation and the result is "text".

Hoever, it still does not work - I have tried several different value lists - and I cannot get any to appear.

Posted

File Corruption? Is it small enough to post a copy?

Posted

Not really. But if you are saying that the same exact setup works in a new file, then you may have corruption.

Posted

I have made it thru the thread now, and need to know if you field behind the value list "Count" can be indexed ...if it's based on a calculation including either a global field or something else turning it unstored is it the cause of confusion.

The file is 47MB - is there a way to check for file corruption?

http://nyfmp.org/1/57

--sd

Posted

I'm not sure what you meant. I am trying to use a field that is a unstored calucation (text) that utilizes a value list. However the value, nor any of the value lists in this db will appear in the field with the calculation being:

"ValueListItems(Get(FileName); "Count")

I have tried replacing the "Get" with the actual file name, which also did not work.

Posted

What I'm trying to establish is, if the valuelist "Count" really works, try to assign it to an arbitrary field and make it a dropdown list in order to check it in browsemode? Why is the valuelist called "Count" it sound more field'ish to me??

What astonishes astonishes me as well is in you first post in the thread the way put it:

I cannot get ANY value list to appear in this field - even with a simple calculation as follows

Appearance of the values of a field, is a layouting matter made by formatting the field ...what shold the ValueListItems( be used for? Earlier was the most common use is when a valuelist is defined over a relation, to use this dynamic approach to gather the ID's of related records. But with fm8+ came List( and GetNth(

But why not look at speed comparisons here:

http://www.filemakerpros.com/LISTNTH.zip

--sd

Posted

Yes the value list does work. I had already done exactly what you thought of - attaching the value list to another field and see if it works. It did.

The value list I am trying to use is actually named "UnavailableRooms". I used the simple "Count" value list(a simple value list of 1,2,3,4 values)also to see if it worked - and it did not. That is why I said I cannot get any value list to work in this field (by way of inserting it through a calculation).

It appears somethng is wrong with the calcuation that I am using for this field: I need to somehow get this value list ("UnavailableRooms")into this field.

The confusing part is this exact calcluation and value list works in another database I have - but I can't seem to find any difference in my application here.

Any other ideas?

Posted

For some reason I cannot access the "valuelists" in a calculation.

I have tried both functions in a calculation:

ValueListItems(Get(FileName); "Count")

["count" is a vaild value list in my db]

ValueListNames (Get(fileName)

BOTH return blank results!

Any ideas?

Posted

It appears somethng is wrong with the calcuation that I am using for this field: I need to somehow get this value list ("UnavailableRooms")into this field.

For a keying purpose right???, take a look how it's done here (check attachment)

The counterlogical thing here is that if the valuelist is empty, must a value be present in field anyhow to make a link, I've here made an "a" appeare in the first line of the keyfield, which is enough to fool filemaker to think an attempt to linking is made.

Next issue that I can't quite explain is why you need to make the fork appear in the primary key end to optain the resonsiveness we're after. I'v turned the field global autoenter'ish with update pending, instead of an unstored calc'field which was all it intutively required ...however wasn't it enough.

--sd

theHotel.zip

  • 1 year later...
Posted

This is a year and a half late, but thought I would post what I think is the answer to this guy's question.

There is a bug in FM9 (and probably prior) with the ValueListItems() function. If you pass a filename in the first parameter that contains a period, the function will return nothing. That is, if the actual name of the FM file on disk has a period in it (such as a file extention), then the ValueListItems function return "".

This happens regardless of whether you pass the first parameter as a string literal (i.e. "MyDabase.fm7") or use the Get(Filename) function.

John

Posted

This has been reported before, though it's debatable whether it's a bug or not.

Basically FMP assumes everything to the left of the first period (.) is the file name. Everything to the right is the extension and it's ignored.

The reason this is debatable is that some people consider periods in file names as verboten, except to delimit the extension. (This behaviour confirms their view.)

BTW there is no need to include the extension (.fp7) in the file name; the Get( filename ) function does not include the extension (this makes things easier for cross-platform work).

This topic is 6005 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.