Hi all,
I have gallery which shows my SharePoint Data. When I filter the data in the gallery and then rest the filter controls, so that all data comes back, it doesn't do so. All the data disappears and doesn't reappear again.
Can anyone please help with this, I would truly appreciate it.
Here are the Image of the Gallery:
Before any reset or filtering
filtered data
After click on the reset button
Codes:
Gallery's Default:
varRecord
Gallery's OnSelect :
Set(varRecord,ThisItem);
ClearCollect(colAccident,varRecord.'Type of Accident');
ClearCollect(colAnyTimeOff,varRecord.'Did the accident result in any time off work');
ClearCollect(colIncident,varRecord.'Type of Incident');
ClearCollect(colInjuriesSustained,varRecord.'Were any injuries sustained? If yes state nature of these injuries');
ClearCollect(colNear,varRecord.'Type of Near Miss');
ClearCollect(colTreatment,varRecord.'Any Treatment given ');
ClearCollect(colAddAttachment,varRecord.'Add an Attachment');
ClearCollect(colIssueForRepairs,varRecord.'Is this an issue for Repairs');
ClearCollect(colLineManager,varRecord.'Do any issue above concern their Line Manager');
ClearCollect(colRepairSuccess,varRecord.'Was the repair a success');
ClearCollect(colSuccessFulConclusion,varRecord.'Have all matters within the report reached a successfully conclusion');
ViewForm(Form1);Navigate(FormScreen);
Gallery's Item:
If(
varDataCount < varDelegationLimit,
SortByColumns( Filter(
Filter(
'Accident Form',
(Status.Value = DrpStatus.Selected.Value || DrpStatus.Selected.Value = Blank()) && ('Please select the relevant option and continue to the next part'.Value = DrpIncident.Selected.Value || DrpIncident.Selected.Value = Blank())
),
TxtSearch.Text in ID || TxtSearch.Text in Status.Value || TxtSearch.Text in 'Please select the relevant option and continue to the next part'.Value || TxtSearch.Text in Name.DisplayName || TxtSearch.Text in 'Date and time of accident'
), varSortColumn,varSortDirection),
SortByColumns(Filter(
'Accident Form',
(Status.Value = DrpStatus.Selected.Value || DrpStatus.Selected.Value = Blank()) && ('Please select the relevant option and continue to the next part'.Value = DrpIncident.Selected.Value || DrpIncident.Selected.Value = Blank())
),
varSortColumn,varSortDirection)
)
Reset Button's OnSelect:
Reset(DrpStatus);Reset(DrpIncident);Reset(TxtSearch);