How to assign a particular inline view to a generated list?

There are ‘trips’.

There are ‘days of the trips’. These are child entries for ‘trips’.

There are drivers assigned in particular ‘days of the trips’. The driver columns are references to a ‘drivers’ table.

Lets say there are 4 days, and 3 of them will have the same driver and the remaining 1 will have a different one.

I am using UNIQUE() to generate a unique list of drivers for the particular trip. But they reference the drivers table, not the ‘trip days’ table.


What I want is to have a list of unique drivers, but as a part of the ‘trip days’ table as opposed to the ‘drivers’ table. It would allow me to place actions that are for the trip days, not for the drivers themselves.

While I can do that, but what I can not do is assign a different inline view for the generated list, rather than the one that is generated by default.

How do I achieve this?

0 14 162
14 REPLIES 14

If you can share relevant screenshots of table columns list /descriptions of referencing of table relations and may be relevant views, the community could offer a more relevant feasible solution.


This is the trip days table. The Sale_UID column refers to as trips.

The Driver_UID column is a reference to a “Drivers” table.

As you can see, each ‘Trip’ can have one or more common drivers.

I want to make a list of drivers who are unique to the trip, and in a virtual column show the total number of days he will be in the trip. Here Driver 1 for 3 days and driver 2 for 1 day.

But now the more I think, the more complex it gets.

We are working with three variables, not two. For a two variable scenario, say drivers on trips, we could easily filter and group information based on either one. But here the scenario is drivers on days of trips for a particular trip.

Forget about the view, I’m now not sure how I can group the data. Unique() only gives a list of unique drivers. Theres no way to determine how many days that driver is in on that particular trip.

If the understanding is correct, the number of days of a driver on the same trip could be found by

COUNT(SELECT(Trip Days[Driver_UID], AND([Sale_UID]=[_THISROW].[Sale_UID], [Driver_UID]=[_THISROW].[Driver_UID])))

Count intstead of sum

But I think this will just output the number of trip days. Which is here 4.

Oh yes, made some changes to the expression in the original post above to get the per driver days

Did the suggested expression work?

This should work to give the number of days a driver has been assigned.

But the unique driver list for a particular trip is like this : 3X_6_a_6af51ebb91f8b37a4024461282e2ae325f5b44f3.png

It is an inline view, with the list as direct reference to the driver table.

Theres no way to put in the number of days there, I guess.


Re:

unique(
select(
[Related Sale trip days][Driver_UID], TRUE)
)

This is the expression I have used to generate the unique list of drivers.

unique([Related Sale trip days][Sale_UID])

And this is the expression I have used in drivers table to generate all the unique trips the driver is in.

Hope this helps you as well.

We could try that. Somehow the relationship of tables is still not very clear. Where do you wish to have this inline driver view, as part of which table? in Days Trip table?

Presume Days Trip Table is a child table of Drivers table?

No in the trips table.

No, the days trips table is child of trips.

I was thinking alike. Maybe days trips table should be made a child of drivers as well?

Again if understandinng is correct, in the Trips table please create a VC with an expression

UNIQUE([Related Sale trip days][Driver_UID])

This should give you list of drivers for that trip as an inline view.

I have done this already.

This forms a list with direct reference to drivers table.

I cannot use actions that will change data in the ‘sales trip days’ table (say Contacted_D, Advanced_D) from a deck view of the inline table that your given expression will generate

Oops, you had not mentioned this requirement before. We could still explore the feasibility of this new requirement if the requirement and details are known in sufficient detail.

I did it.

The trick was to use another intermediate table, which would only hold the keys of the drivers, guides and users, not in repetition. Its kind of like the table is another child of the trips table.

When a new driver, guide or hotel is added to the trip days, they get added to the new trip as well. But more than that, they do not. What I have done here basically is rather than having unique() do the work (which pulled references from the main tables of drivers, guides and hotels), I made a physical table which did the same job as the unique() would do, but I had them physically written in a sheet, with reference to the trip as well.

This allowed me to ‘action’ their involvements in the trips easily.

Excellent ! Nice to know you and thank you for the update.

Top Labels in this Space