Use two different views for the same table

Juanan
Participant I

Hi,

I am trying to explain a situation I need to solve. Hope my explanation is clear.

I have a table of activities that is related (REF) with two other tables: Team (each activity is leaded by one team and each team leads n activities) and Objective (each activity is related to an objective it helps to develop and each objective has many related activities). Each Objective is assigned to a team that leads its development.

The schema is as follows

2X_4_444204fd5c1418edbc5c4145f282419a3d690129.png

I need two different ways to view Activities:

  • If I come to activities from the view of a Team, I need to see them grouped by Objective
  • If I come from the view of an Objective, I want to see activities grouped by Team

Cannot figure out how to deal with this problem. Hope someone has a clue to solve it.

Thanks in advance.

Solved Solved
0 2 447
  • UX
1 ACCEPTED SOLUTION

MultiTech
Participant V

Have you connected these tables using references?

If so, then inside the Teams table you should have:

  • Related Activities
  • Related Objectives

Also, inside Objectives, you should have:

  • Related Activities

If so, then youโ€™ve got inline views for these - I assume is what you mean by:

I see what youโ€™re talking about: both would share the same inline view.

  • Related Activities

You want to know how you can have one inline view for one view, and another for another.

The answer isโ€ฆ complicated, but doable.

Perhaps thereโ€™s a way to use CONTEXT() here, but what Iโ€™ve done in the past is:

  • Create a slice of the table I want another view for
  • Make my view for the slice
  • Create an additional column in my parent table, using a variant of the Ref_Rows(โ€œTableโ€, โ€œRef_Columnโ€) thatโ€™s already there. Instead of pulling records from the original โ€œTableโ€, instead switch that to the slice you just made: Ref_Rows(โ€œSliceโ€, โ€œRef_Columnโ€)
  • Specify which column to show in your parent detail views.

This creates another inline view (just like the one thatโ€™s already there) but the data comes from the slice (which has itโ€™s own view) - thus giving you the ability to change how records are shown in one view from the other.


Complicated, yeahโ€ฆ maybe a bit messy. Iโ€™m wondering if you might be able to use CONTEXT() to determine which inline view would be used for child records on a parent detail viewโ€ฆ Iโ€™ll experiment and report back.


******UPDATE - I tried creating a duplicate inline view and using CONTEXT(โ€œViewโ€) <> โ€œViewNameโ€ to exclude one and show the otherโ€ฆ failure.

Did not work. But honestly, that would be asking a lot of the system - to evaluate not only if the column should be shown, but also which view to use?

View solution in original post

2 REPLIES 2

MultiTech
Participant V

Have you connected these tables using references?

If so, then inside the Teams table you should have:

  • Related Activities
  • Related Objectives

Also, inside Objectives, you should have:

  • Related Activities

If so, then youโ€™ve got inline views for these - I assume is what you mean by:

I see what youโ€™re talking about: both would share the same inline view.

  • Related Activities

You want to know how you can have one inline view for one view, and another for another.

The answer isโ€ฆ complicated, but doable.

Perhaps thereโ€™s a way to use CONTEXT() here, but what Iโ€™ve done in the past is:

  • Create a slice of the table I want another view for
  • Make my view for the slice
  • Create an additional column in my parent table, using a variant of the Ref_Rows(โ€œTableโ€, โ€œRef_Columnโ€) thatโ€™s already there. Instead of pulling records from the original โ€œTableโ€, instead switch that to the slice you just made: Ref_Rows(โ€œSliceโ€, โ€œRef_Columnโ€)
  • Specify which column to show in your parent detail views.

This creates another inline view (just like the one thatโ€™s already there) but the data comes from the slice (which has itโ€™s own view) - thus giving you the ability to change how records are shown in one view from the other.


Complicated, yeahโ€ฆ maybe a bit messy. Iโ€™m wondering if you might be able to use CONTEXT() to determine which inline view would be used for child records on a parent detail viewโ€ฆ Iโ€™ll experiment and report back.


******UPDATE - I tried creating a duplicate inline view and using CONTEXT(โ€œViewโ€) <> โ€œViewNameโ€ to exclude one and show the otherโ€ฆ failure.

Did not work. But honestly, that would be asking a lot of the system - to evaluate not only if the column should be shown, but also which view to use?

Great!! It works fine!
Maybe a little tricky but fully functional

Thank you very much.

Top Labels in this Space