I wanna filter a gallery based on a user().Email and if is not, show the only which he created.
And I try this code:
If(User().Email="USER@ADMIN.COM";Despesas;Filter(Despesas;StartsWith(Solicitante;TextInput1.Text) || ID = DropDown1.Selected.ID || 'Status de pagamento'.Value=ComboBox4.Selected.Value;SortByColumns(Despesas;"ID";Descending);'Criado por'.Email = varUser.Email))
My goal is:
If is the USER@ADMIN.COM he can filter by name or ID or "status de pagamento", and if is not she only show the items he created.
Solved! Go to Solution.
Hi @Gorilla_8 ,
I don't see any error in your syntax however try it as below:
Step1:
If(User().Email="user@admin.com";Despesas;Filter(Despesas;CreatorEmail=varUser.Email)
Step 2:
If(User().Email="user@admin.com";Despesas;Filter(Despesas;CreatorEmail=varUser.Email||Solicitante = TextInput1.Text)
Step 3:
If(User().Email="user@admin.com";Despesas;Filter(Despesas;CreatorEmail=varUser.Email||Solicitante = TextInput1.Text||'Status de pagamento'.Value=DropDown1_1.Selected.Result)
step4:
If(User().Email="user@admin.com";Despesas;Filter(Despesas;CreatorEmail=varUser.Email||Solicitante = TextInput1.Text||'Status de pagamento'.Value=DropDown1_1.Selected.Result||ID=DropDown1.Selected.ID)
So we will know which is stopping the result set.
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to help.
Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,Hi @Gorilla_8 ,
Change your filter as below:
If(User().Email="USER@ADMIN.COM",
Sort(
Filter(Despesas,
StartsWith(Solicitante;TextInput1.Text) || ID = DropDown1.Selected.ID || 'Status de pagamento'.Value=ComboBox4.Selected.Value, 'Criado por'.Email = varUser.Email)),SortByColumns(Despesas,ID,Descending))
I hope this resolved your issue if you see any challenge/need further help let me know I am always happy to help.
Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,Hi @KrishnaV , thanks again for the help!
But I got same error, he expects 2-3 parametres, I think I got lost some parentheses..
Take a look:
If(User().Email="user@admin.com";
Sort(
Filter(Despesas;
StartsWith(Solicitante;TextInput1.Text) || ID = DropDown1.Selected.ID || 'Status de pagamento'.Value=ComboBox4.Selected.Value; 'Criado por'.Email = varUser.Email));SortByColumns(Despesas;ID;Descending))
Hi @Gorilla_8 ,
My bad I have correct my syntax errors, silly me 😞
If(User().Email="user@admin.com",
SortByColumns(
Filter(Despesas;
StartsWith(Solicitante;TextInput1.Text) || ID = DropDown1.Selected.ID || 'Status de pagamento'.Value=ComboBox4.Selected.Value; 'Criado por'.Email = varUser.Email);ID;Descending))
Proud to be a Super User!
Regards,Hi @Gorilla_8 ,
I just noticed that you like my reply is there anything I am missing to mark that as a solution?
Please let me know so that I can help you better.
Proud to be a Super User!
Regards,Hi @KrishnaV !, Igot this error:
I dont know why, i dont worl well with multiple filters.
The 'sort columns' function has invalid arguments
Hi @Gorilla_8 ,
Please change the Combobox selection as :
ComboBox2.Selected.Title
where my combobox is populating with SampleList.Title
Proud to be a Super User!
Regards,Hi @KrishnaV !
I have make a filter by all the data, but can you help me to filter by selected user?
Filter(Despesas;CreatorEmail=varUser.Email||Solicitante = TextInput1.Text||'Status de pagamento'.Value=DropDown1_1.Selected.Result||ID=DropDown1.Selected.ID)
I have this code, but I wanna the user logged filter by only his created item.
Hi @Gorilla_8 ,
Filter(Despesas;Creator.Email=varUser.Email||Solicitante = TextInput1.Text||'Status de pagamento'.Value=DropDown1_1.Selected.Result||ID=DropDown1.Selected.ID)// if creator is a people picker column
Filter(Despesas;Created.Email=varUser.Email||Solicitante = TextInput1.Text||'Status de pagamento'.Value=DropDown1_1.Selected.Result||ID=DropDown1.Selected.ID)// this will pull with the default created sharepoint list column
I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to help.
Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Proud to be a Super User!
Regards,User | Count |
---|---|
174 | |
111 | |
86 | |
44 | |
41 |
User | Count |
---|---|
238 | |
149 | |
132 | |
77 | |
75 |