randallw VIP
Total posts: 74
04 Окт 2013 00:19

Use case: - I have two record types: A and B - Type A is the one I want site visitors to see - Type B is an attribute of A - Types A and B have a many-to-many relationship - Within Type A Full Record View, I want to show the list of type B records containing a list of the related type A records. - Result: site visitor views record of type A. After finishing viewing the type A record content, finds the type B attributes list at the bottom of the full record view containing more type A records... then clicks onto the type A record they are interested in... resulting in another view of type A record containing more links to related type A records... and so on.

First up, does this make sense?

I have set up Parent/Child Relation fields on Types A and B and while it seems to work, there are quite a few parameters in the Relationship field setup that I don't understand.

Type A - contains field Related-B (Relation-parent)

Type B - contains field Related-A (Relation-child)

On type A full record view, I can see the list of type B records and can format the list using the Relationship field --> Show Children --> template override field... but cannot get it to show the type A related records.

Interestingly, on the Relationship field --> Show Children... both template override fields can control the list of records in full record view. This might be mis-configuration or a bug.

Последние изменения: 02 Март 2014


Konstantin
Total posts: 1,113
04 Окт 2013 06:27

The topic is so complicated, I cant understand what work and what not. Can you give a link where I see what write above with bugs screenshots.


pepperstreet VIP
Total posts: 3,837
04 Окт 2013 08:10

Hard to understand your application. Sounds like an "infinite loop" ;-) Can you describe it any further?


randallw VIP
Total posts: 74
04 Окт 2013 09:03

The basic concept is that I want site visitors to see the content in TypeA records. TypeA records are related by a common attribute (TypeB). When viewing TypeA full article view, I then want to show the list of TypeB attribute values with links to their associated TypeA records.

I can see how this could easily turn into an infinite loop, but I only want to show two levels.

From the site visitor point of view... they have come to see some content. After reading the content, they look to the attribute list at the bottom of the article to see other records to go to.

I haven't done the full analysis, but I expect site maintenance to be simpler as each new TypeA record only needs to be linked to the appropriate TypeB records, then the Relationship fields will take care of the rest. Honestly I'm too new to Cobalt to really understand the implications around what I'm proposing, but I've got the workflow mapped out and it all makes sense in my head :-)


pepperstreet VIP
Total posts: 3,837
04 Окт 2013 10:14

Not sure what are "attributes" in your case... and how is the relation created? Manually? (hence ReadAlso field) Or do you bind A to B by a certain field-value? Since you are talking of artcile full-views... did you have a look at "Records Fields"? It allows to display related articles and more stuff automatically.


randallw VIP
Total posts: 74
04 Окт 2013 16:57

Thanks pepperstreet. I had a look at both of those fields in theory only at this stage.

The relationship of Ax to Bx is created manually at the time of creating record Ax. So if there were already 4 typeA records (A1 to A4) linked to B1, viewing any of the typeA records would show B1 and links to all 4 typeA records.

Adding record A5, linked to B1, would then show a link to A5 on all pages for records A1 to A5.

Hopefully Sergey will let me know if what I'm trying to do is technically possible, otherwise I'll play with the other fields to try and get the same effect.


pepperstreet VIP
Total posts: 3,837
05 Окт 2013 19:50

The relationship of Ax to Bx is created manually at the time of creating record Ax.

BTW, a new relation from A -> B is done via selection on your submission form! So, childs of type B have to exist. During submission of Type A, it is not possible to create a new type B.

The "add new" and "add existing" buttons are available AFTER type A is saved. The visibility of those actions can be controlled for list and full-view. And for a certain J! ACL.

The relationship of Ax to Bx is created manually at the time of creating record Ax.

Adding record A5, linked to B1, would then show a link to A5 on all pages for records A1 to A5.

Not sure, if i got the idea... in general relations show-up on both sides.

If you relate A5 and B1, the other Type A records do not get this information. A5 has only one connection... and B1 record has multiple connections to other A records. So, B shows every A record relations. (according to the limit parameter).

BTW, the child field has extra parameters to allow "multiple parents"! If this is important for you.


randallw VIP
Total posts: 74
06 Окт 2013 18:19

Yes, I manually create the Bx record (if it doesn't already exist, without filling in the relation field) then create the Ax record with the relation to Bx.

The basic structure I'm looking for is shown in the following rough sketch:

Thanks for you help pepperstreet. It may simply come down to me misunderstanding some configuration, or perhaps I'm trying to do something that doesn't technically make sense in Cobalt. Hopefully I can at least explain clearly what I'm trying to achieve.


Sergey
Total posts: 13,748
07 Окт 2013 07:21

Relate fields are limited to 1 level depth only to avoid loops. There is no way to change it.


randallw VIP
Total posts: 74
07 Окт 2013 15:03

Thanks for clarifying Sergey.

Does what I explained make sense?

Is there a possibility for two levels in future? In my mind this would be an extremely powerful automatic cross-referencing feature.


Sergey
Total posts: 13,748
08 Окт 2013 02:00

What you want to achieve make of course sense. And may be we will add ability to limit inclusion level. But anyway this is very complex algorithms тв we will be able to add it only in Cobalt 9.


randallw VIP
Total posts: 74
08 Окт 2013 03:35

As always, great work and customer service. Thanks Sergey.

Работает на Cobalt