Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hello! I am trying to make a simple timeline graph and would like to use a repeating field for simplicity's sake. The field would have 25 repetitions representing half hours from morning till evening. Each half hour can be filled with a name, from a drop-down value list.

Unfortunately there a few simple calculations I need to do, and one is to count how often each name is assigned in the course of one day. In other words count the number of occurrences of a specific value within a repeating field.

Is that possible without using a script or creating a report? Thanks in advance for your help!

Posted

It is probably possible. But you really should use a portal into a related table instead of a repeating field. You can make the portal look just like a repeating field if you like. Then, once you data is in the related table (but viewable through the portal) you can accumulate, calculate and sort in ways that are not doable by repeating fields. Run, don't walk away from repeating fields.

Hope this helps.

Posted

Mikewson is right take a look at how the coloring is obtained in this:

http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000733

Where you in the download locates a folder called "Unlocked Calendar"

A solution which by all means is one of the most correct relational way to structure a calendaring solution.

--sd

Posted

OK. That's what I would normally have done. I usually do avoid repeating fields, but I thought in such a simple case I could make things easy for myself, save the extra table and just have one harmless little field.

I'll bite the bullet.

As an extension of the question, however, can someone explain how repeating fields differ from lists? They can be converted into lists like any text field with multiple values, for example. It doesn't seem to be possible to count identical values in lists either.

Posted (edited)

It doesn't seem to be possible to count identical values in lists either.

Why not?

ValueCount ( FilterValues ( list ; item ) )

Edited by Guest
typo
Posted

It does seem to require first translating the repeating field to a list.

Yes, of course. A repeating field is not a list - I thought that was obvious from your post.

Posted

Hello! I am trying to make a simple timeline graph and would like to use a repeating field for simplicity's sake. The field would have 25 repetitions representing half hours from morning till evening. Each half hour can be filled with a name, from a drop-down value list.

Unfortunately there a few simple calculations I need to do, and one is to count how often each name is assigned in the course of one day. In other words count the number of occurrences of a specific value within a repeating field.

Is that possible without using a script or creating a report? Thanks in advance for your help!

There are custom functions that do text summaries. See http://concise-design.com/downloads/invoice_cf.zip for some ideas.

Posted

There are custom functions that do text summaries. See http://concise-design.com/downloads/invoice_cf.zip for some ideas.

But the first parameter require a set of records either related or a found set due to the use of GetNthRecord( ... although it just requires "1" as the third parameter, well Comment's suggestion beyond being simpler, must also be a tad faster ... since each CF have a security measure to prevent endless recursive loopings - ticking in at each looping. Finally is it more flexible due the use of List( which works with both repeaters as well as related data, while yours shines when dealing with the found set too.

But I like the hint towards getting the data to aggregate upon, pushed a relation away :,) - If it should have been rejected, on a seemingly inadequate behaviour!

--sd

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