Jump to content

Related data all in one field


Tpaairman

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

Recommended Posts

I have two tables, well say Table 1 and Table 2.  Table 1 has Field A and Field B, Table 2 also has Field A, which is used to relate to Table 1.

On Table 2, I can have a portal with Field B in it (from Table 1) but the problem in this case is it would be very helpful to be able to see several portals at once.  But Field B only contains 1 or 2 digit numbers.  So what I was wanting to do in the layout for Table 2 is have Field A and well say Field C, and just view as a list.  Field C would have all of the related values from Table 1 that match.  So the data would look something like this:   2 17 5 14 32 8

In other words, Field C is taking the place of the portal, and showing all of the related data in a line instead of like a list.

Link to comment
Share on other sites

Please, please, please: never use such abstract examples to explain your problem. I had to read this like 10 times before I could understand what you want, and I almost gave up.

Now, given a Parent table and a Child table, you can use a calculation field defined in the Parent table (result is Text) =

Substitute ( List ( Child::Somefield ) ; ¶ ; " " )

to get a list of all related values from Somefield, separated by a space.

  • Like 1
Link to comment
Share on other sites

 

On February 6, 2016 at 3:40 AM, comment said:

Substitute ( List ( Child::Somefield ) ; ¶ ; " " )

Hello i have used the piece of code in my solution the field i am using is a date field for the list.

i get back

2/1/2016 2/2/2016 2/7/2016 etc

would like to get back 

1 2 7 how would i edit the calculation to get the sample above

thank you 

Edited by RT
Link to comment
Share on other sites

5 minutes ago, RT said:

how would i edit the calculation to get the sample above

You need to add another calculation field in the Child table that will extract the day (assuming it's the day) portion of the date. Then apply the above calculation to this field.

Link to comment
Share on other sites

My apologies on over simplifying the field names.  In the mean time however, it works quite well.

11 hours ago, comment said:

You need to add another calculation field in the Child table that will extract the day (assuming it's the day) portion of the date. Then apply the above calculation to this field.

In the interest of keeping things a bit tidy, instead of adding another field, wouldn't this work as well:       

Substitute ( List (Day ( Child::Somefield )) ; ¶ ; " " )

 

Edited by Tpaairman
Link to comment
Share on other sites

11 minutes ago, Tpaairman said:

wouldn't this work as well

No, it would not.

Day ( Child::Somefield )

returns the day of the date from the first related record. And applying the List() function to a single value does not accomplish anything.

 

 

Edited by comment
Link to comment
Share on other sites

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