Hi all,
I thought this should be simple but I am struggling with the formula.
I am trying to simply set a variable varUserDepartment with the staff members department as stored on a sharepoint list
i.e. Sharepoint List "Staff List" is as follows
Department (choice field) Name (people field)
Accounts Joe Bloggs
IT Janet Doe
In PowerApps - when Janet Doe logs in I want to set the varUserDeprtment to equal 'IT' (based on a "Staff List") and then set a Gallery (based on a "Projects List") to only show Projects where the department matches varUserDepartment
I am setting the value for the variable varUserDepartment on my onStart and getting this correctly populated (tested with just adding a text label on my screen).
This is the Items property of my gallery - I can't get to work (I have some filter options - these are working correctly on their own)
SortByColumns(
Filter(
Search('Staff Projects',txtSearchName_2.Text, "Full_x0020_Name"),
('Review Status' = cmbSearchStatus_2.Selected.Value || IsBlank(cmbSearchStatus_2.Selected.Value)) &&
('Department' = varUserDepartment || IsBlank(varUserDepartment))),
"Review_x0020_Status", SortOrder.Ascending);
Can anyone assist me please 🙂
Thanks so much