Filter by dropdown or estatus

Julio Angel Mejia 0 Reputation points
2023-02-12T20:17:07.35+00:00

I need help to load the data of some projects in a gallery. I want it to only load the data with status PJ1,PJ4,PJ6. But at the same time I also want the user to be able to filter through a dropdown only the data of a specific status and if there is nothing selected in the dropdown that loads the 3 statuses mentioned above. My current approach doesn't work, I have this:

  SortByColumns(
        Filter(
            Projects,
            Estatus = "PJ1" || Estatus = "PJ4" || Estatus = "PJ6" || Estatus = ddEstatus_2.Selected.Value,
            Date >= DateInicialG_3.SelectedDate && Date <= DateFinalG_3.SelectedDate,
        ),
        "Fecha",
        Descending
     )
  1. Estatus = "PJ1" || Estatus = "PJ4" || Estatus = "PJ6"
  2. Estatus = ddEstatus_2.Selected.Value

 

If I only put 1 or 2 in the code it works fine, but if I only leave the option 1 the user will not be able to filter and I only leave the option 2, the filter does not work

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,077 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 44,671 Reputation points
    2023-02-13T17:06:05.1466667+00:00

    Hello there,

    So are you getting an error message or is the logic not definitive?

    A common type of report is the master/detail report, in which the report begins by showing some set of "master" records. The user can then drill down into one of the master records, thereby viewing that master record's "details."

    There are many ways with which a master/detail report can be implemented. https://learn.microsoft.com/en-us/aspnet/web-forms/overview/data-access/masterdetail/master-detail-filtering-with-a-dropdownlist-vb

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

  2. Limitless Technology 44,671 Reputation points
    2023-02-13T17:06:13.5066667+00:00

    Double post

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.