Hello!
I have a gallery and I want it to be filtered by the user. If the email adress is in the following column: Admins, administrators
I want them to be able to see it all. If their name does not match the emails from the emails in the culumn, I want them to only see the tickets that they have submitted. To see who made the ticket I have created a column with email().FullName, this is stored under: Mancotabel, Verzender
This is the code of the gallery:
SortByColumns( Search( Switch(selectedStatus, "All",MancoTabel, Filter(MancoTabel, IsBlank(selectedStatus) || Status = selectedStatus ) ), TextSearchBox1.Text, "Ordernummer", "Verzender", "Deelorder", "Extern", "Product", "Intern", "Deelorder", "Tekeningnummer", "Omschrijving", "Status" ), "Datum", If(SortDescending1, Ascending, Descending) )
So basically we need to put a filter over this that checks if their email is in a column and if it is, it would show all the tickets. If it wouldn't be in there I want it to filter on mancotabel, verzender and then on their full name. So they only see the tickets they created theirselves.
It would be awesome if someone could make this code for me and send the code
Solved! Go to Solution.
The original code like this works indeed. It is just showing all the tickets, which is not really what I want. Here is what is inside of MyCol, basically just all of my columns https://gyazo.com/5b6a2fc5fb14e04511174f4151109236 @v-siky-msft
SortByColumns(
Search(
Switch(
selectedStatus,
"All",
MancoTabel,
Filter(
MancoTabel,
IsBlank(selectedStatus) ||
Status = selectedStatus
)
),
TekstZoekVeld.Text,
"Ordernummer",
"Verzender",
"Deelorder",
"Extern",
"Product",
"Intern",
"Deelorder",
"Tekeningnummer",
"Omschrijving",
"Status"
),
"Datum",
If(
SortDescending1,
Ascending,
Descending
)
)
Hi @Anonymous ,
It seems the OnStart property is not triggered, please Click 'Run OnStart' to check if the issue is fixed.
And I recommend you rewrite the codes, instead of just replacing MancoTabel by MyCol, to debug which part is wrong.
Sik
That has indeed fixed this. This is what is inside now:
I also figured out what went wrong... I forgat to replace the "TextSearchBox1.Text" with the name of mine, because I renamed it. I don't get any errors now. I have tested this and I think this got it working! Thank you
So I need to replace MancoTabel with MyCol everywhere inside of my application? I now get this error trying to submit a ticket: https://gyazo.com/1c32613d02a2fc41d49a7b44d1b2c3a1
https://gyazo.com/4b92b5d49dfdf75416548e22c750c908
It seemed to have worked for a few minutes but now I can see a ticket even when I changed the verzender to 'zien' and not my own name. https://gyazo.com/50f3c554f01f6a8851efe568b977feae
@v-siky-msft