Skip to main content

I have a main list view showing records created in the system but now need to filter the view based on where the logged in user may be linked to for team names.


Examples: 

User 1:   Team A

User 2:  Team A, Team B


Main View:
User 1:  Should see records for Team A
User 2:  Should see all records for Team A & B


I was going down the path of using the For Each in list view then filter name to the first view - but it's only pulling 1 name not 2.

 

Is there a better way to do this?   

Picture included.

 


11170i5EE72B864F0F828F.png

Hi K2 Developer

 

Can you please follow up with the link regarding your problem seems like your problem once resolved within this kb article, kindly reconfigure it make suit your needs https://help.k2.com/support-services/kbt134376

 

Thank you,


Not sure that would work for my scenario.

 

I need to have the view automatically pickup that the user belongs to 1+ teams based on another SmartObject (Team Members) and populate the list view with the records accordingly.  I was trying to get the data to go into a data label or list control but it only seems to pick up 1 option.

Would like to create a view / filter where the user doesn't have to physically pick a team. 

 

The article appears that it would require a 'distinct' view of team names for user to use as a drop down on the view.  Not an option for me.

Hope that makes sense!


Good day AAschenbrener

 

By the look of things it seems like you want to load smart object list view based on the currenlty logged in user, if that's the case please follow the following steps:

1. On form initializing rule, you can get the username/ID/email of the currently logged in user by going to context browser then under current user select maybe email which will uniquely identify a specific user.

2. On the teams list that you want to view, you can filter the results by email and this should return all the teams that the user is signed up to.

 

Please let me know if the logic given works, kudo or mark it as a solution if it works.

 

Thank You

 

Regards

Thabang

 

 


Thabang92 -  I may not be explaining things well enough.

 

We have one smartobject holding records created  (SMO 1) - one column is teamname.

 

A user could be linked to two teams (which this information is not stored under current user information).
We have one smartobject view called team members (SMO 2)  - which holds the name of users and which teams they belong to.  Users could belong to 1 + teams.

 

I have successfully been able to populate a list view linked to the current logged in user to populate the teams the user is associated with.

 

Now I need to some how  to filter the SMO 1 with the teamnames displayed in SMO 2.  But when I try to filter or run the for each in list view - it only filters off 1 of the records. 

 

Hope that explains better.


Posting a picture - hopefully that will help.

 

If a user is part of 3 teams, if they click on a 'Team icon' it would filter the SMO List View with all of the values in the list.

 

I even have the list displaying the 3 teams visible now.  It loads upon initialization based on user display name.

 



Reply