0
votes

I have inherited a PowerApp from my colleague which includes a gallery that uses a sharepoint list as its datasource. The purpose of the gallery is to allow Admin users to search for all the submitted forms in their department (IT, Finance etc...), however not all the data is showing in the gallery. The data collected should be dated from December 2018 to the current date (December 2019), but the data stops at October 2019 instead.

I think this is due to the radio button that has been added to the screen. The radio button should enable the admins to filter the gallery data depending on form status. See below formula:

SortByColumns(
    If(
    Radio1_1.SelectedText.Value = "All",
    'IT Forms',
    Radio1_1.SelectedText.Value = "Approved",
    Search(
        'IT Forms',
        "Approved",
        "Status"
    ),
    Radio1_1.SelectedText.Value = "Rejected",
    Search(
        'IT Forms',
        "Rejected",
        "Status"
    ),
    Radio1_1.SelectedText.Value = "Form Number",
    Filter(
        'IT Forms',
        ID = IDInputText_1.Text
    ),
    Radio1_1.SelectedText.Value = "Awaiting Approval",
    Search(
        'IT Forms',
        "Awaiting",
        "Status"
    ),
    Radio1_1.SelectedText.Value = "Form Type",
    Filter(
        'IT Forms',
        Title = ITFormType.Selected.Result
    )
), "Created", Descending)

But as stated above, not all the data is being collected. Although I have found that up-to-date data is collected when I bypass the radio button and use the below formula:

SortByColumns('IT Forms',"Created",Descending)

I can use this as a work around for now, but I will need to add the radio button back onto the screen as soon as possible. I have increased the Data Row Limit in Settings from 500 to 2000, but it hasn't made a difference - so now I have ran out of ideas to resolve this.

Any help or suggestions will be greatly appreciated.

Gallery results with filter and Gallery results without filter

1

1 Answers

0
votes

How are u populating your radio button options? Writing it by hand could create some problems. First i would recommend writing this in your Items property of your Radio button: Distinct('IT Forms', Status)
What it does is get all distinct values of "Status" and add them as options to your Radio. And instead of having an if statement for each option of the Radio, you can:
SortByColumns( Filter( 'IT Forms', Status = Radio1_1.Selected.Result))
Try and see if it shows all data with this option.

And as far as i can understand you have to select "Form Number" to Filter the results by ID and "Form type" to search by title. But why not give the user the option to use all types at the same time? You can do this:

SortByColumns(
If(IsBlank(TitleInput) && IsBlank(IDInputText_1) && IsBlank(Radio1_1.Selected),
    'IT Forms',
    IsBlank(TitleInput) && IsBlank(IDInputText_1) && !IsBlank(Radio1_1.Selected),
    Filter('IT Forms', Status = Radio1_1.Selected.Result),
    IsBlank(TitleInput) && !IsBlank(IDInputText_1) && IsBlank(Radio1_1.Selected),
    Filter('IT Forms', ID = IDInputText_1.Text),
    !IsBlank(TitleInput) && IsBlank(IDInputText_1) && IsBlank(Radio1_1.Selected),
    Search('IT Forms', TitleInput.Text, "Title"),
    !IsBlank(TitleInput) && !IsBlank(IDInputText_1) && IsBlank(Radio1_1.Selected),
    Filter(Search('IT Forms', TitleInput.Text, "Title"), ID = IDInputText_1.Text),
    !IsBlank(TitleInput) && IsBlank(IDInputText_1) && !IsBlank(Radio1_1.Selected),
    Filter(Search('IT Forms', TitleInput.Text, "Title"), Status = Radio1_1.Selected.Result),
    IsBlank(TitleInput) && !IsBlank(IDInputText_1) && !IsBlank(Radio1_1.Selected),
    Filter('IT Forms', ID = IDInputText_1.Text && Status = Radio1_1.Selected.Result),
    !IsBlank(TitleInput) && !IsBlank(IDInputText_1) && !IsBlank(Radio1_1.Selected),
    Filter(Search('IT Forms', TitleInput.Text, "Title"), Status = Radio1_1.Selected.Result && ID = IDInputText_1.Text)
    ), "Created", Descending)

Try it and tell me if it works for you or if you have any more questions. Best regards