Hi,
I've built a new gallery with items details and status.
Those Items can have 4 different status, New, In Progress, Cancel and Close.
I've created 4 buttons for the 4 status.
Each buttons as OnSelect field
UpdateContext({FilterByNew:!FilterByNew})
UpdateContext({FilterByInProgress:!FilterByInProgress})
UpdateContext({FilterByCancel:!FilterByCancel})
UpdateContext({FilterByClose:!FilterByClose})
Now, my goal is to sort/filter my gallery per statu when i click on one of the buttons, and this is where I'm having problem.
It does not filter correctly. I need to click twice for something to filter correctly,
Here is the code that i have put on the Gallery Items:
If(
FilterByClosed = true,
(Sort(
Filter(
'[QA_Data].[AUDIT_REQUEST]',
(REQUESTER_USER_NAME = (lbUserName_R004.Text) && STATUS_OF_REQUEST = "Close")
),
SYSTEM_SUBMITTED_DATE_TIME,
Ascending
)),
If(
FilterByNew = true,
(Sort(
Filter(
'[QA_Data].[AUDIT_REQUEST]',
(REQUESTER_USER_NAME = (lbUserName_R004.Text) && STATUS_OF_REQUEST = "New")
),
SYSTEM_SUBMITTED_DATE_TIME,
Ascending
)),
If(
FilterByCancel = true,
(Sort(
Filter(
'[QA_Data].[AUDIT_REQUEST]',
(REQUESTER_USER_NAME = (lbUserName_R004.Text) && STATUS_OF_REQUEST = "Cancel")
),
SYSTEM_SUBMITTED_DATE_TIME,
Ascending
)),
If(
FilterByInProgress = true,
(Sort(
Filter(
'[QA_Data].[AUDIT_REQUEST]',
(REQUESTER_USER_NAME = (lbUserName_R004.Text) && STATUS_OF_REQUEST = "In Progress")
),
SYSTEM_SUBMITTED_DATE_TIME,
Ascending
)), Sort(
Filter(
'[QA_Data].[AUDIT_REQUEST]',
(REQUESTER_USER_NAME = (lbUserName_R004.Text) && STATUS_OF_REQUEST < > "")
),
SYSTEM_SUBMITTED_DATE_TIME,
Descending
)
)
)
)
)
Can you please help me with this issue?
Thanks again for all the help.