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
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โ
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
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.
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.
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |