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

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

Recommended Posts

Posted

Hi,

I am a bit new, but I have been so frustrated with this problem.

I want to be able to Make a Calculation Field that would result in combining the rows in a portal (in a related table).

Here is what I mean.

Lets say Table one has Contacts...

Table two has their phone #s.

I want a field (Hopefully a Calculation) in the Conctacts table that would bring up lets say all the "Related" Phone #s in table 2.

So the result would be something like this:

(215) 123-4567

(215) 987-6543

(215) 111-2222

and so on..

I was able to do this through a VERY VERY Length process. I would create some Value List based lets say on the Phone # in the related table; then my Calc. Field would be Get(Value List Items). But I found this to be not practical.

Please Help

Sam

Posted

Let your Contacts table have fields:Contact_ID,Name

The Phone table:Contact_ID,Phone

Create relation by Contact_Id with allowing creating record.

Then in Contact table create portal for this relation.

Posted

I'm not sure what aaa is talking about, but the best way to build all your related values in a calc is with the ValueListItems() function. It sounds like you already discovered this function but found it too complex. What can we say?

If you tell us your purpose for needing all the related values in one field, maybe we can offer other ideas.

Posted

Well I am building a Patient Charting System.

As you know I would need after each visit to create a Final report. The report should contain those fields in the portal.

Lets say I want to make the Patient's Medical History in a seperate Table. (This is helpful when wanting to gather some statistical analysis.

So I create a Med. History Table and relate it lets say to a Patient_ID field.

This is cool so far....

Now lets say in the Med. History Portal you have several values

Asthma

Diabetes

Heart Disease....etc

After I put all my data, I need to generate a report. In this report the Med. Hx should be a part of that report as well as all the records in its portal... Does that make sense?

I think Creating Values and then a Calculation field is not only complex, but redundant, and could possible effect the performance of the data base.

I thought about running a script to put all the records in a portal in a field and then past that to a Field in the initial table.... But that is even more redundant, and makes the scipts... not so practical....

I hope there is a Solution.

Thanks

Posted

Although sliding portals doesn't work so well in FM7, perhaps there's room to put a Med History portal on the report. Maybe you've already considered this.

That possibility aside, you could certainly use a scripted approach to 'build' lines in a Med History field in the local table. I'm not sure that this is any easier than the ValueListItems() calc. ValueListItems() does not carry much overhead for your file as the calc is unstored, though this means the calc must be computed on the fly. If there's not too many related values, this will calculate very quickly.

You might consider running the report from the related table instead, showing the parent table's info in a sub-summary part. This works well if there's a wide variation in the number of related records, or you want to compress the white space in those records.

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