Slice to show another slice or table in ref column

Hi,

I currently have two tables โ€œTimesheetโ€ and โ€œWork Ordersโ€ and each of these tables have a slice โ€œMy Timesheetโ€ and โ€œMy Work Ordersโ€.

When I am in the slice โ€œMy Work Ordersโ€ or in the table โ€œWork Ordersโ€ it has a Ref Column that links to the โ€œtimesheetโ€ table. However what I would like to accomplish is that when I am in the slice โ€œMy Work Ordersโ€ it shows the slice โ€œMy Timesheetโ€ and then when I am in โ€œWork Ordersโ€ it will show the table โ€œTimesheetโ€.

I am not sure where to begin.

Thanks,
Josh

0 10 1,592
10 REPLIES 10

I think we need more details on what you mean by this statement.

Maybe you mean when you are viewing a Work Order record it shows the RELATED Timesheet records?

And vice-versa when viewing a Timesheet record the app shows RELATED Work Order records?

Yes. That is correct that is what it does currently. However I use a slice to show me โ€œMy work Ordersโ€ instead of all โ€œwork ordersโ€. What I would like to do is when I am in the โ€œmy work ordersโ€ view it shows a Ref column of โ€œmy timesheetโ€

In this screenshot it is showing the data of โ€œmy work ordersโ€ which is a slice. The ref column pointed to is of โ€œtimesheetโ€.

The problem is that it shows all timesheet records for this work order not just the slice of โ€œmy timesheetโ€.

However I still want the work order table to show all timesheet records of this work order when i am not in the slice of โ€œmy work ordersโ€


This view is correct because it is of the data work order therefore i want it to show all related timesheet records for this work order

Essentially, I do NOT want to see everyones timesheet records when I am in the view of โ€œMy Work Ordersโ€ I only want to see my timesheet records. BUT when I am in the view of โ€œWork Ordersโ€ I DO want to see everyones timesheet records.

Hopefully this helps clarify what I am looking to do.

Thanks,
Josh

I think I have it now. The last paragraph cleared it up.

I think what you need to utilize is a Security Filter on the Timesheet table - no Slice needed. I have not used them yet but from what I know it is extremely simple.

In the Security section, select the Security Filters tab, open the Timesheet table and insert an expression that will identify the rows for the logged in user. Viola! For each logged in user, they will only see Timesheet records that pertain to them.

You can be as complex as you need. For example, you may want Managers to see ALL Timesheet records so you can simply adjust your expression to identify which logged in users are Managers.

You can read more about Security Filters here:

As far as I am aware this does not solve my problem. Yes, it would stop showing me others timesheets but that would be app wide as far as I can tell?. I still want the ability to see others timesheets when I am in the work order view and not see others timesheets when I am in the myworkorders view.

Hi @Josh_Klassen,

I believe you may also wish to mention, whether you would like this behavior ( seeing only โ€œmy work ordersโ€ against all work orders) for all the users or only say managers or admins.

Also as discussed by @WillowMobileSystems, are you using security filters in your app

@Suvrutt_Gurjar

I am not currently using security filters in my app as of yet. However when I do use security filters I would assume I would be able to restrict the access of the โ€œWork Orders Viewโ€ to only certain users or user groups. However I would still want the view of โ€œMy Work Ordersโ€ to show the slice of โ€œMy Timesheetsโ€ instead of the inline view of โ€œTimesheetsโ€.

Hi @Josh_Klassen,

You may wish to try the following

This approach relies on use of USEREMAIL() to shortlist โ€œMy Work Ordersโ€ or โ€œMy TimeSheetsโ€

Please create a VC called say [My TimeSheets]in the โ€œWork Ordersโ€ table with an expression something like

SELECT([TimeSheet][Key Column Name of TimeSheets Column],[UserEmail]=USEREMAIL())

[UserEmail] is the column capturing userโ€™s email in the โ€œTimeSheetsโ€ table.

Here timesheet is the Reverse reference list type column in the โ€œWork Ordersโ€ table whose screenshot you have shared.

The above expression will create a list of only those timesheets related to the user matching the
USEREMAIL()

Now in the slice โ€œMy Work Ordersโ€ , please use filter such as [UserEmail]=USEREMAIL()

In the slice columns , please have the [My TimeSheets] list column instead of the [TimeSheet] list column.
Edit: The above approach will display time sheet records related to only that particular user in the โ€œMy Work Ordersโ€ slice.
Hope this helps.

Hey,

That WORKED sort ofโ€ฆ

As you can see in this screenshot it is showing three records in the timesheets ref view. Two are me and one is someone else. At the bottom you can see that there are 3 records to view. Then in the mytimesheets ref view it is not showing anything but yet there are two records to view.

Even when testing the expression it does bring back the desired result.

2X_6_6ef0cd9b1aef3d2a64b202e85e9ebe892acb3852.png

Any idea on how to fix this?

Thanks again,
You have been a great help so far.

Josh

Hi @Josh_Klassen,

Could you mention what happens if you tap on the View(2) button. Do you see the complete record? Also you may wish to check the name of table and detail view when you tap on View(2) for โ€œMy TimeSheetsโ€.

There seems to be some challenge with the inline table view for โ€œMy TimeSheetsโ€ in your case.

I am able to see the shotlisted โ€œMy TimeSheetsโ€ records ( Image below).
The sample I tested has the same inline table view for "All TimeSheets"and โ€œMy TimeSheetsโ€ views. This TimeSheet tableโ€™s inline view is based on TimeSheets table and not on slice etc. Also there is no slice called โ€œMy TimeSheetsโ€ etc. on TimeSheets table. You may wish to verify your view configuration accordingly

.

Okay,

This is the view for โ€œMyTimesheetsโ€ when clicking on the View(2) button.

And this is the view for โ€œTimesheetโ€ when clicking on the View(3) button.

This is the formula for the virtual column that is inside the โ€œWork Ordersโ€ table.

Top Labels in this Space