Hey guys, I got a simple connection on Common data service and I wanna filter the galery by current user,
And I tried this code, but didn't work out...
If(User().Email="admin@admin.com.br";'Solicitações de Projeto'; Filter('Solicitações de Projeto';UsuáriosdoOffice365.SearchUser().DisplayName=varUser))
Someone have any ideas how to filter?
I got this var on my app "OnStart": Set(varUser; User().Email)
Solved! Go to Solution.
Hi @Gorilla_8 ,
Do you mean filter the gallery to only show the item created by users, right?
If so, please try this:
If(
Lower(varUser)="admin@admin.com.br";
'Solicitações de Projeto';
Filter('Solicitações de Projeto';'Created By'.'Primary Email'=varUser)
)
Hope this helps.
Sik
Try:
If(User().Email="admin@admin.com.br";'Solicitações de Projeto'; Filter('Solicitações de Projeto';UsuáriosdoOffice365.SearchUser({searchTerm:""}).DisplayName=varUser))
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Try:
If(User().Email="admin@admin.com.br";'Solicitações de Projeto'; Filter('Solicitações de Projeto'; varUser in UsuáriosdoOffice365.SearchUser({searchTerm:""}).DisplayName))
Or
Create a Collection onstart:
Set(varUser; User().Email);
ClearCollect(MyUsers,Office365Users.SearchUser({searchTerm:""}).DisplayName)
Then filter as:
If(User().Email="admin@admin.com.br";'Solicitações de Projeto'; Filter('Solicitações de Projeto'; varUser in MyUsers))
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Hi @eka24 ,
I tried the first filter, but i got a delegation error on "in"...
So, like you suggest, I tried the second one...
The error says: The function clearcollect has invalid arguments
I dont get that error
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
Me too...I dont get it
You have a semi-colon where you should have a comma between MyUsers and Office365Users.
Hi @Gorilla_8 ,
Do you mean filter the gallery to only show the item created by users, right?
If so, please try this:
If(
Lower(varUser)="admin@admin.com.br";
'Solicitações de Projeto';
Filter('Solicitações de Projeto';'Created By'.'Primary Email'=varUser)
)
Hope this helps.
Sik
Hi @v-siky-msft ,
The filter you suggest stoped work:
If(
Lower(varUser)="admin@admin.com.br";
'Solicitações de Projeto';
Filter('Solicitações de Projeto';'Created By'.'Primary Email'=varUser)
)