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

Using PatternCount on a portal


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

Recommended Posts

Posted

Nope, you have to define a new list utilizing the relation:

1) define valuelist

2) use values from field (press specify)

3) choose table and field

4) CHOOSE "Include only related values" including the from....

It would probably take some time to grasp if you havn't done it before ...The easiest way to check is to make a unstored calc' with ValuelistItem( before you let it be part of the inner mechanics of the solution.

--sd

Posted

Joseph,

Take a look at the last sampler I submitted as it should answer the case with very small adjustments. I preferred Soren's for the initial need of a Yes/No flag, but if in fact you need to do some dynamic comparisons on the index, having the Value List deployed is the solution.

The calc used to determine wether there's one or many brokers is actually evaluationg the number of pillcrows. Just change it so that you get the number instead of the "Only one/More han one" result.

Posted

You guys are so above me in FM is Funny... I like learning this stuff but I does get a little confusing when you have so many relationships already...

I will study the sample that you gave me... Thank you..

Joseph

Posted

Ok I give... I am just not that good at this yet.. If it is no trouble can you show me an example... All I want to do is count (Number for the answer) how many times in a portal column a new word shows up...

ex:

Bob

Bob

Jack

would be 2

ex:

Bob

Bob

Bob

would be 1

Thank you

Posted

Ok, fter pulling my hair out... I got it to work with my data base... I really thank you for showing me this...

If you have the time can you answer these for me:

1. What are the Parigraph marks; and what do they mean?

2. Why does it say 1 even if ther is no entry in a cell... can it say 0 or stay blank if there is no entry

Thank you

Joseph

Posted

Why does it say 1 even if ther is no entry in a cell... can it say 0 or stay blank if there is no entry

Are you ready for the next trick?? Draw a new portal around the calcfield showing the same relation as the portal. But here is it just one row and the lines the portal consists of is changed to none width. This is known as the visibility trick. The field in the portal isn't from the related table but is the calc with ValueListItem( ...

http://www.filemakerpros.com/Visible.sit

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

Why do I make such a silly thing? Because debugging as well as recalculations are faster than building the calculation that otherwise would dependant on the number fo rows in the portal.

If we should have done it that way would the calc have been:

Case(Count (RecordsinPortalFile PORTAL::LogInID;PatternCount(ValueListItems(Get(FileName);"RelatedBrokers")& "

Posted

I know why you are similing in your picture... It's b/c you are really good a FM. Ok, I think I am ready for your next trick, but I have to ask something first before I do a lot of thinking to follow what you are saying...

I wanted to use the calc field with an report... meaning when you print a report it will show how many there are for that field (Difference only). So if I make a new portal and then make it invisable does that mean it will not show up on the report as 1 when there are really zero?

Joseph

Posted

So if I make a new portal and then make it invisable does that mean it will not show up on the report as 1 when there are really zero?

No you're correct here, the Case( is what's required here! And it might even have to be put inside an Evaluate( to provide correct breakings??

--sd

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